Universities are of course nowadays also vocational education facilities (with a strong track on research). I'm always flabbergasted where this misconception about higher education as some form of romantic ivory tower comes from.
I don't really see why they shouldn't be understood as both. Specially in fields like CS, engineering, law, medicine and economics and so on. There is need for highly skilled and educated people in industry even for regular roles. On other hand there is also need for scientist and researches. Both roles are somewhat different, but I dont' see now reason why they couldn't be trained at same facilities.
Well I'll take a stab at why CS should not be vocational. The field is first and foremost a branch of applied mathematics. The tooling taught in a CS program only has utility insofar as it serves to teach the fundamental mathematical concepts. This is especially true for undergrad.
In my opinion, there are far too many people enrolled in CS programs who would be much better served by a software engineering degree or program. However, modifying the way CS is taught us not the answer. A separate niche needs to be carved out.
In many European countries, vocational schools (usually called universities of applied sciences, for instance Fachhochschule in DACH, IUT in France) offer just that.
Nowadays there are even bridges to "proper" universities if you want to pursue a more academic MSc after your vocational BSc.
Because universities see themselves as research institutions - that's where they get their prestige and status from, not from teaching. Teaching people to code doesn't do anything for them (except pay some of the bills).
The whole bachelors -> masters -> PhD process is just winnowing out the unworthy and stupid. The ones who survive this and go on to publish papers are the entire point.
The entire IT industry is a byproduct of CS research, not the point of it. The point of it is to explore the intellectual realms enabled by the mathematics of CS.
Reducing this to "university CS departments exist to train programmers" is ridiculous.