In this case, it's less like two different bakeries are making two separate cakes and more like one bakery didn't want to come up with their own recipe so they went and stole a different bakeries chocolate cake recipe and used it as their own. According to the court case, Google didn't steal just a fragment, they stole 11,500 lines of code. Just like books and articles are copyrightable, so too is code. Many people can write books on the same topic in different ways, but if you were to directly steal the words and ideas from somebody else's book that is clearly wrong, so too are there many ways to put together code and structures and with 11,500 lines of code being stolen, there is certainly a different way to accomplishing a goal of that size.
Question Three