You're missing nepotism from the equation. The salaries available at American Big Tech have made it so that graduates see a dev career as more desirable than traditional prestige industries like investment banking and law. The same nepotistic hiring practices common in those industries will also become entrenched in tech and already are to an extent.
I have worked for 40 years in software. I have seen very little nepotism. Contacts, yes. Nepotism, no.
I'm not denying that it happens. I don't think it's a significant driver, though.
What is it you think "nepotism" means?