Nobody is forbidding overtime work - they are exempting tech employees from receiving pay for the overtime they work. Much of this legislation was passed in the US through the lobbying of big tech corporations (Microsoft) to increase profit margins. I personally would like to revoke my right to work overtime for free.
They are not prohibiting tech employees from receiving overtime, nor are they prohibiting companies from paying tech employees overtime.
The law simply does not require companies to pay overtime to tech employees (along with other, more traditional professionals such as doctors, accountants, and lawyers).
You're correct in that tech companies can pay overtime but in real terms this legislation results in no tech companies that actually pay overtime (but Im sure there is some rare exception). I'm sure there is a bandwagon of free-market folks who would be quick to point out why this is good for tech workers but from a practical point of view it has lead to an industry that treats long hours for the same pay as the norm.