A lot of these companies get away with it because they're not selling it but giving it to other companies for benefits.
None of that data, from any company, is personally linked back to YOU personally though. Not Microsoft, Sony, Google, Apple, etc. That would be illegal and 110% beach of privacy.
If you're in the market to buying a ps5 for instance. Google isn't specifically targeting a guy name John Doe because he searched "how to buy ps5". Sony isn't then contacting John Doe via email because Google sold their information to Sony. Fedex, UPS, USPS,etc isn't suddenly contacting Sony within 0.5 seconds of Johnny's order, for an inquiry on who can ship him the console the quickest, because Sony sold their customers data to the shippers.
Everything is anonymous, and because John is on the lookout for a ps5, he would be the targeted audience for Sony to advertise to. Not because Sony specifically knows that John Doe specifically is on the hunt for one.