The first time you get hit with a targeted ad, a suggestion for a new friend or something else that seems based on your personal information, it can be a little intimidating. It's almost like there are elves in that machine, picking out ads just for you. And, of course, that's pretty much exactly what's going on -- only instead of elves, it's computer servers, and they don't know anything about you, or care.
They just take a list of everybody who's interested in soccer, for example -- whether they've posted about recent news or games, clicked "like" on a team or event, or listed themselves as playing for a team -- and then push the same soccer-oriented ad toward everybody. The elves never even know your name.
Facebook uses and shares your personal information in many ways that basically operate on this same principle: By aggregating it (making a big pile of the data), they make sure that you're not personally attached to the information itself. After all, marketers don't really care about you, either. They just want to divert their advertising to anybody who might like to buy their stuff. And, of course, on the other end, they just want to know how many people are even interested in the first place. Does it bother you if Facebook tells an advertiser that 100,000 people like a given movie, if you just happen to be one of those 100,000 people?
Of course, when you sign on to third-party applications and sites, or connect your accounts through Facebook, you're agreeing to a bit more than that. But Facebook takes precautions to make sure those other companies don't use your information in sketchy ways, to the degree that it can, and takes pains to ensure that you know what you're getting into before you agree.
The final controversial way Facebook can share your data is when matters of legality come into play. If there's a reasonable belief that illegal, terroristic or abusive behavior is going on, Facebook will cooperate with the authorities. However, here we're also talking about jurisdiction, which means that for users in countries that don't benefit from the same freedoms and rights that Americans do, Facebook might be cooperating with investigations and governments of which you might not personally approve.