STEM doesn't retain people, particularly women (only one woman I know that I graduated with is still a tech worker) and plenty of others got tired of taking orders from project managers and decided to become them or go found something.
A lot of people think that as software engineers they get to develop the product. In practice, I have mostly been an ticket processing Oompa Loompa. You can get some input, but that requires arguing with people you would often rather not argue with. That drives a lot of people away.
It depends on the engineer. Some are interested in steering the direction of the product, but a majority are not. Coming in, picking up Jira tickets, and clocking out is enough for many software engineers. I don't blame them, and in fact it's probably a good thing; too many cooks in the kitchen becomes problematic.
A lot of people think that as software engineers they get to develop the product. In practice, I have mostly been an ticket processing Oompa Loompa. You can get some input, but that requires arguing with people you would often rather not argue with. That drives a lot of people away.