I could be completely wrong, but I know they have a tagging system in place. The tags presumably come from metadata providers (they give basic information about the song, like who wrote it and when it was made, as well as pictures for album covers and such). After that they can pretty easily look for similarities, eg. two items both tagged funny. If you were concerned that they upload your listening history somewhere to come up with recommendations, they do not.
I could be completely wrong, but I know they have a tagging system in place. The tags presumably come from metadata providers (they give basic information about the song, like who wrote it and when it was made, as well as pictures for album covers and such). After that they can pretty easily look for similarities, eg. two items both tagged funny. If you were concerned that they upload your listening history somewhere to come up with recommendations, they do not.