The restaurant isn't telling you who goes into the restaurant. They're just selling you access to those people through that ad.
-----
The other problem, the Cambridge Analytica problem, is a bit different.
It's like saying that the restaurant requires you to tell them your name and other personal information in order to eat at the restaurant. Maybe it's to send flyers or deals, doesn't matter.
The problem happens when the restaurant also asks for your friends personal information, and you give it to them without asking your friends.
That's basically what Facebook is under fire about. Allowing your friends to very easily give your information out without you knowing.