Or they do it anyway and hope they just won't get caught.
And even if they do get caught, the likely punishment is just paying out the wages they owe, so why not chance it? Fines don't scale based on revenue, profit, or even damages, if there even are fines.
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.