In the case of Facebook and Google, they are not "company sponsored events" more like the company provide those facility and opportunities for people who want to do it anyway. For example you can drop by the arcade at Google and play a game of DDR, and if you make some friends there it's all for the best, not unlike the real world outside of work. Same is true for the meals, you absolutely can choose to eat alone with your headphones on, but you can also talk to people.
TL;DR the relationships are by no means shoved down your throat by the company, they just provide an environment that makes it easy.