An interesting book on this topic is 'Shop-class as Soulcraft.'
There may be some virtuoso programmers that can write astounding software without any prior experience. However, there are aspects that take most people years to learn, due to the time it takes to release a project and see it's failings. This is different from learning physics, philosophy, or the academic aspects of law and medicine which can be learned in a classroom setting. However, the practical aspects of law and medicine cannot be learned without years of experience in the field.
So yes, to be able to start practicing software the required body of knowledge is much smaller than medicine or law -- however this is somewhat artificial. There is monopoly control over licensing for doctors and lawyers. If there were monopoly control over licensing for programmers, they might have to spend years in the classroom before practicing as well. I believe that apprentices could start practicing medicine and law much earlier in their careers and learn the facts they need along the way. This would be a lot more affordable for students, but it would lower the wages of lawyers and doctors, so it's probably not going to happen.