Not illegal, as in you've actually gone through this with a lawyer, or not illegal, as in your company does it anyway?
Because Federally, being salaried does not work like you describe: https://www.dol.gov/agencies/whd/fact-sheets/17g-overtime-salary
Working less hours in a day is not valid reason to deduct pay. Working less full days is. (From the source above)
State law does not trump federal law, unless explicitly called out. It's just that federal law is actually pretty lax regarding most things and states are more restrictive.
A huge chunk of them are not where people want/need to live though.
Vacant housing in Detroit doesn't help people living in SF