An essential part of "the job" is to get done what the company wants you to do. Even when that's stupid. Fair. But toxic jobs are still toxic to us, and staying is still our decision. Pending finding another better job - but sometimes even before having found the better job because sanity matters.
No one will tell you during recruitment process about shit show they have or crazy manager. Or even if there was a nice team you've been interviewed to, after onboarding you could be reassigned to the toxic team to fix legacy code.
(To be fair and for background, Google did not invent this - but perhaps pushed it much further than it was before. For example some variations of this at Wall Street firms in the 70s?)