The terms are that you run the code they give you. If you don't like those terms, don't go. Simple as that.
Is that the position you're trying to advance?
To modify your analogy: If a restaurant says to you when you arrive "If you want to eat here, you must eat the food you're served, force fed. Do you still want to eat here?" And then you say "Yes", then yes, you are obligated to abide their terms.
Do websites take on a duty to protect visitors from the foreseeable harm that malicious ads cause to unprotected computers by requiring content protection software to be disabled?
I'm pretty sure that's illegal.
They can require you to pay for the meal if you don't eat all of it. They can't legally force you to eat the food.
If a website poses an interstitial that says "To access this content you must agree to disable your ad-blockers or purchase a subscriptions." and you click "agree" but do not disable ad-blockers or subscribe, then you have a point. However, you are in breach of contract, and there is still no theft.
However, the agreement MUST be explicitly agreed to. If another visitor clicks a link that goes straight to the content, they are not in breach of contract because they did not explicitly agree.
Just like if I hand you a box of donuts on the street you have to eat all of them, right now, in front of me, and hope that none of them contain battery acid.
Seriously though, a requirement to run code has never been an implicit TOS on the web - if a site wants to introduce those terms, it needs to actually propose them when I visit the site.
A website can't retroactively propose terms after I've visited.
Further, what does "run" mean in this context? For example, I don't download images by default on mobile devices - is that not "run[ning] the code"? - or different rendering engines, or screen-readers, that run the same code differently.