I don't think it's a matter of oversupply, it's a matter of allocation of resources. Are there more developers than what there would need to be in a hypothetically optimal allocation of headcount? Yes
Say you have X billions of dollars to spend on headcount. How do you determine where to put people such that the money is allocated efficiently and people are working on the right things? How do you make sure that the money gets used efficiently? It's in the billions, you don't have time to do this. So you have to delegate, which leads to managers gaming the system.
In smaller companies, it's easier to determine this because things are still simple enough for the top-level leadership to have some idea.
As the company gets bigger, more bad actors enter, there is more fabrication and empire building trying to frame where the headcount is "needed". Bigger companies handle this differently. Maybe they just get slower and pay less. Or maybe they do more layoffs. Moving people around internally is too complicated for the VPs, it's easier to just cut and hire later.
Why does software have this problem specifically? Idk, maybe it occurs in other places. But at least in the case of software, the systems become very specialized and it's hard to really figure out what matters and what doesn't