It really isn't all that simple. I felt the same way when I was younger - "just switch jobs yo" - but as I grow up I realize that there are increasingly many external life factors forcing people into an unhealthy work environments which can be outside their control.
I work in a shitty legacy PHP codebase, but I do it for the great money and can accept the pain willingly. It is much easier to tolerate things when you know there is an exit nearby, but I imagine people can get much more jaded when their visa depends on the shitty employer, debts loom over their head, medical costs are piling up, kids require feeding every month etc.