Basically, schools don't teach a lot of topics that are required on the job; if you ask why, they just say that they teach how to learn.
What other fields do, like civil engineering and medicine, is have a licensing board. The board certifies that you know how to do the job. Often studying for the exam requires covering topics that weren't part of the curriculum.
It's easy to say that there's too many variations / topics in Software Engineering to have licensing; but medicine has just as many sub-specialties and they figure out how to have good exams.
One more thing to point out: In medicine, job interviews are mainly based on mutual interest; because the licensing board determines competency. We (software engineers) could learn a lot from that process.