Long before the internet, people still bought things, and even before they paid for things with credit cards, they paid with cheques that had their home address on them. They inevitably filled out paperwork for various things, on which they complacently included their phone number, which could be cross-checked using the white pages(and other "deep" sources for those willing to pay). Most people strangely had few qualms about writing down their social security number on a piece of paper and giving that to their prospective employer. Grocery stores began offering free "club" cards for fake deals, which asked customers to provide personal contact information so they can "save" a buck on a head of lettuce.
Put simply, people have made their lives open books since before they took the internet seriously, and before advertising could be so closely tied to analytics and data harvesting. The retrieval of information is much, much more efficient, but in principle it's the same sort of transaction. You give out your phone number once and you can bet it's on lists for good. Actually, you don't even have to give it away.
Businesses have long existed to compile information on people, buying it from a variety of businesses, and selling back the aggregated data. Our means of giving them our data has become much more streamlined.
It's not just that, though. Our handing over of information has become seemingly more reciprocal in that we hand over our data in exchange for access to things that are very cheap or free. Facebook may be the prime example of this principle, since the business itself is based on data aggregation; there is no middle-person. And, for a long time, people liked Facebook. People actually like things that are cheap or free in exchange for handing over their phone number, turning off or not installing an ad blocker, linking their Facebook profile, enabling GPS tracking on their phone, and allowing apps access to their contacts, or making their purchase history public(Venmo), etc.
For the average person, it's really hard to beat cheap or free.