Note, though, that in most threads on HN about qualifications for programming or software engineering there are usually quite a few comments from people saying that they never actually use anything from the classes they had to take to earn their STEM degree.
As far as actually teaching them things they would use on the job the STEM degree was no better than any random humanities degree. The only value they say they get out of the STEM degree as opposed to any other degree or no degree is that many employers use a STEM degree as a filter when hiring.
You can also see this whenever any thread about software interviewing comes up. People complain about having to cram memorizing a bunch of algorithms and data structures that companies like to ask about.
Those questions would be right at home on a CS class homework assignment. If the class material was something that working programmers actually had to use they would not need to cram for it when it comes up on interviews.
So yeah, a STEM degree is more valuable for a typical programming job than a humanities degree--but not for any good reason.