Could most cookie warnings be avoided entirely?

I often read articles by following links. The articles are often on major media sites, and I can understand if they want me to create a user account - I am free to say no, and they are free to limit me to three articles, or whatever. But they also display cookie warnings. Why don't they simply use the minimum cookies necessary for the site to function until I create an account, then they can ask me about setting additional cookies? Why harass passers-by when you might never see them again anyway? What use are Analytics of such casual users?

Upgrading the cookies at account creation seems like a much saner approach, more user-friendly, and much more likely to get me to create the account. Sites that ask to display notifications, know my location, etc. are likely to never see me (voluntarily) again.