You mention "protected class". Would really appreciate some details.
These almost universally include race, sex, sexual orientation, age, disability, becoming pregnant, being required to participate in a mandatory action like jury duty, and I think being recalled to the military if you are on inactive status.
If an employer violates these, the ex-employee has grounds to sue.
The exceptions are called "protected classes". It's illegal to fire someone for their race, gender, religion, sexual orientation (in some states), pregnancy, or age.
And so we have another reason that companies might need to adopt fascist office hours: not doing so might get them sued.
(I strongly believe in the idea of the ADA and am not suggesting that the proverbial baby be thrown out with the &c &c).