I worked in a couple of Japanese tech offices. Contracts and salary included prepaid overtime, to get around the government saying ALL overtime should be paid. But they must have also allowed up to 40 hours per month to be considered "reasonable", so that number was in the contract, and I'd only get overtime if I went over it. Felt like a shitty loophole to agree to, but luckily both companies were super cool and overtime was uncommon, but happened sometimes. So it felt like they'd just put it in as a convenience, like saying "there might be some overtime, but let's not deal with paperwork unless it gets out of hand". And the "40 hours" was paid regardless.
It would definitely be a convenient loophole for companies to continue shitty practices, so I think I just lucked out with the places I worked at.