I've taught off and on for 30 years now, and over the entire time one thing has remained pretty constant: About 10% of the students completing the programs are really good; they will be star programmers and eventually software architects. Another 40% are competent - they would be able to carry out plans created by others, but should never carry any larger responsibility. Good, solid programmers. The remaining 50% manage to graduate, but frankly should never work directly in the field. Maybe they can be testers or write documentation, but never let them write a line of code in a real project.
Unfortunately, it's not always obvious what kind of person you are hiring. Add to this mix the people who are self-taught, who are coming from some other field, and may have wildly inappropriate ideas. Just as an example, I am currently working with a company whose star programmer (and he really is very good) comes from process control - and has zero clue about testing or quality control. He writes code and assumes that it works, and his company is so glad to have him (at a grunt-level salary) that they refuse to insult him by testing his code - so they deliver his work untested straight to clients - you can imagine how well this works.
tl;dr: There is no shortage of bodies in STEM fields. However, there is a shortage of good people who also have a solid education in and understand of their field. This is true in computer science, and almost certainly in every other STEM field out there.