It's not clear yet exactly why Amazon bought Goodreads, but the most obvious reason would be the Goodreads Recommendation Engine. Goodreads has been building this engine since well, since it launched, but they doubled down on their efforts in 2011 with the acquisition of Discovereads.com. That site was integrated into Goodreads and ever since then has been the basis for the Goodreads Recommendation Engine.
It is also possible that Amazon wants to gain access to the more than 23 million book reviews that have been posted by Goodreads members, as well as the book summaries they may have written. That would make a lot of sense for Amazon, and it is similar to one of the ways that Amazon has used Shelfari. Amazon has drawn on the book summaries that have been created by Shelfari members and used them for the X-Ray feature which Amazon launched with the Kindle Touch in the Fall of 2011.
But no matter how much Amazon gains from Goodreads, it comes at a loss of the site's reputation. The news may only be a few hours old but there has already been pushback from users. The response from twitter leans heavily towards the negative, and some users are already deleting their accounts.
This is a shame, because until yesterday Goodreads had enjoyed a good reputation for being a neutral party. It wasn't under the influence of any retailer of publisher, and it even broke ties with Amazon in early 2012 when Goodreads decided that Amazon's rules for accessing Amazon's book data API were too restrictive.
But as popular as the site may be, Goodreads is not without its issues. After a number of conflicts in the Summer of 2012 between authors and their reader-reviewers, Goodreads laid down a new review policy that sided with authors.
This focus on authors over readers could be one of the reasons that Amazon bought Goodreads, but that is unlikely.
Goodreads is far larger than at least one of the other 2 book community sites owned by Amazon. LibraryThing (Amazon has owned a 40% share since 2006) has a membership count around 1.6 million, but Shelfari (acquired by Amazon in 2008) has not disclosed their membership numbers - not in any location I can find.
Edit: It occurs to me that Amazon also owns a 4th social network, though few may think of it that way. That network is focused on the Kindle.
I wonder if the lack of info on Shelfari membership might be a sign of Goodreads' future. Goodreads is known for sharing insights into their community in blog posts and conference presentations, but now that they are owned by Amazon they could be be as close-mouthed as their corporate parent.