1) There is a business preference to find the best candidate for the lowest rate (practical sense) which leads towards hiring the youngest/cheapest resource available who meets the criteria.
2) Existing companies refuse to invest in building up / educating employees. In the old days you hired based on merit and potential, but you also provided training to make sure employees adapted with technology. These days, there is no training and employees are expected to adapt on their own (there are certainly arguments for keeping on top of things, but if you have a full time job and other obligations, external interests might not be technical/career related)
Unfortunately, because of (1) and no requirement for companies to commit to (2), there is a push to allow for more non-domestic workers through programs like H1-B and related visas.
Personally, I think most engineers should hone their skills and continue to learn and evolve. That said, some situations don't allow that and when coupled with a refusal of companies refusing to hire/train based off potential, we end up in the mythical "STEM crisis".
I'm not talking the founder visa issue here, I am talking the normal boots on the ground. For which, no longer training and wanting the cheapest option have created a toxic environment for a certain segment of the tech community.