And no, they can't sell it to whoever they want (or at least that's a reduction of how Facebook and Google use your data). They do monetize the data with their internal advertising platforms that they sell to people like OP, rather than letting anyone monetize the data without the knowledge or consent of their users.
That would be a step too far in privacy invasion? How convenient Facebook cares about privacy exactly when it's in their financial interest, and even more convenient all their users draw the exact same line.
For example, if you scraped tinder profiles and published a map of all tinder users in a city most would agree that’s a privacy invasion.
The only way to balance the desire of users to make some data public and prevent anyone from grabbing all of it forever is to ban people from using automated tools.
Plus users agreed to tech giants' terms of service (it is a different story that almost no-one reads them and have any understanding of them in the real sense) whereas users did not agree to OP using some tool to scrape their data.
Maybe this is not fair but it is how things are