Here's something I was thinking about: why is the Blogger platform (free blog hosting by Google) free? Certainly, it's not free for Google to host all those webpages.
I wonder if it's just a way to get people to spend more time online. Maybe they're assuming that if you spend more time online, then you will use Google search. And if you use Google search, then you will see the ads and indirectly generate more revenue for the company.
People seem to forget that Google and Facebook are for-profit companies (not that there is anything wrong with that). And generally, they can't make money unless you're online. As such, they may be subsidizing products that get people to spend more time on the internet.