They don't. They do the work for a community they're part of. The social network hosts that community, and tries to make a profit doing so.
I organise a meetup that's held in a pub (well, not at the moment). People coming to the meetup spend money on the pub's beer and pizza. Am i doing free work for a for-profit public house?