That depends on whether fixed costs of hiring another developer (and coordination costs) outweigh the variable costs of the current developers working more. The variable costs could be lesser quality of work when the developer is overworked or overtime laws.
Overtime laws are supposed to act as a penalty on companies for not hiring enough labour for the required task.
Edit: you're far less likely to risk burning out your employees if they are hard to replace.
One intended result is that it would forcibly remove the option of externalizing the consequences of intentionally under-utilizing the labor pool. It prevents bad behavior (behavior that should already be illegal IMO). Freely exploiting your workers because they have no bargaining power should always discouraged.
I certainly agree that unions can make a big difference in the intermediate case.