story
Some of it stems from something very wonderful about our profession - we are flexible about how people can acquire this background. In law, you must do a 3 year JD[1], and you must typically pay way over 100k for it. Alternate paths toward learning this material are pretty much illegal (as in, we'll put you in jail if you try to practice law if you haven't done the 3-year degree, regardless of your master of the material).
For instance, I was a math major, and I only took a bit of formal CS. However, when I did self-study to try to plug some of these gaps (partially for interviews, partially for my own education), I was surprised with how much I actually had covered from a different angle. Many of my math (and later, in grad school, Industrial Engineering) professors ran "labs", some for a bit of extra credit, others as an optional set of assignments. I took graph theory through a math department and stuck around in the lab and so forth to implement some of the algorithms, to learn about how some types of proofs actually contain an algorithm. BFS, DFS, minimum spanning set. That all involved building trees, lists, using pointers. In numerical analysis, I did a lot of matrix algebra manipulations. And so on. If CS were run like law, it would be illegal for someone like me to work as a programmer, because my degree isn't an ABET accredited CS degree.
The downside to all of this, though, is that there is no recognized credential. I don't object to being taken through my paces, I object to how random, capricious, and redundant the process has become. I read a blog article about a programmer who took the bar and studied for 100 hours and passed. Think on that for a second and compare it to the amount of time people spend preparing for and taking what are essentially white board exams in technical interviews. The bar, an exam that is considered one of the most brutal rites of passage for a learned profession? In some ways, we go through that every time we do a new round of interviews when we change jobs!
Actuaries have to show understanding of relatively advanced math, but senior actuaries don't (to my knowledge) get grilled on integration by parts or some specialized set of partial differential equations when they interview. Why? Because there is a proper exam for their field (and unlike law, actuaries are free to obtain this background through multiple educational paths, they often major in math, but hardly always).
Another problem is the capriciousness of the tech exam/interviews. I believe that a "bill of rights" so to speak slowly evolved between examinee and governing board over time in true professions. The nursing and medical boards, the actuarial exams, the bar - these fields have a tough exam (or series of exams), but they are consistent, there is a clear study path, there is a commitment to grade them fairly, there is a clear study path, if you fail, you get feedback or at least a score (the bar doesn't write you back and say they "decided not to pursue your candidacy further at this time"), there is often a second (or additional) change at the exam, and, most importantly, when you pass you get a lasting, public credential respected by your peers in the field.
People often describe these exams as the most brutal, anxiety ridden, stressful events of their professional lives. This is why, I believe, they slowly evolved that "bill or rights" that protects the examinee.
Unfortunately, in tech, I believe we experience these exams over and over, but without any of those benefits.
I am a-ok with requiring people to show competence, but the way we go about it is, I think, badly broken. I believe that this process accounts for a great deal of attrition in the field, as well as people deciding not to enter the field in the first place.
[1] yes, a bit of handwaving, it's not quite that simple in some states.