Cookies are now stickers with writing on them and computers are now cars. Businesses that you drive up to or close to have license to slap a sticker on you whenever they want with whatever they want.
So we write a law to say "hey you gotta at least ask before you slap a sticker on, most of the time".
We all know why we didn't just make a sticker proof car. As long as the largest ad company in the world is also the defacto king of the internet we will have these issues.