If the website says to display ads, my browser will properly ignore that. If the website says to prevent the user from switching away from the tab, my browser will properly ignore hat. If the website tries to take over my system and install malware, my browser will properly ignore that. And if the browser tries to break the ability to remember passwords, my browser will properly ignore that too.
Websites consist of code to be interpreted by browsers as they see fit, for the benefit of their users. Those users do not necessarily want exactly the experience the site authors want them to have.