you realize modern browsers have millions of lines and over a decade (or two!) of legacy code running that are under constant scrutiny by actors who spend all their time finding exploits in binary executables, right?
you realize your operating system also ships system updates on a regular, often daily basis, right?
quality web design sure, but Meta/Facebook is also well known for using dark patterns to promote stickiness and engagement. They’ve built Facebook to be addictive and keep people on it.