The thing is, that's not really true. Developers made it possible for advertisers to insert their adverts into web resources. Advertisers decided to use that power to track users through cookies, tracking pixels, localStorage and various Javascript tricks. Yes, there were no doubt a few developers working for the ad companies, but they are far outweighed by the mass of developers that work for content sites.
Marketers did not build the tracking systems. Developers built them and then website owners decided they were happy to deploy them. Everyone had to accept the proposal at least implicitly for us to get to where we are today.
You could say that Google, specifically, has so much power in web-advertising that no content site could walk away from them if they don't like how they behave but I don't think this is the case.