Why has the Daily working hours constraint not been taken into account?
In the My resources page (or another term, depending on the default terminology as personalised and defined in the My activity page) configure the Daily working hours / Automatic start time / Daily work time constraints.
The Daily work time parameter is only active if Automatic start time is set to Enabled.
Example configuration
My resources can start work from 08.00 onwards, and will finish work at 18.00 at the latest working for a maximum of 8 hours.