Salary is a payment schedule, that's it. Anything else requires contractual agreement.
The fact that you think it gives companies the right to demand irregular hours is more about your mindset than reality.