A big part of it, which you allude to, is that many people are either self taught entirely, or having studied CS during undergrad, are self taught in practical software development.
In a field like mechanical engineering, I assume an employer can take for granted that a new grad has a certain set of skills (general physics, structures, fluids, etc.). That can't be assumed in quite the same way in software engineering.
Interesting thought, since I don't have a degree in CS, I'm not sure what it entails. Does it not include any "practical programming" at all?
In that case, should we conclude that universities are the failing piece here, and that is why even with a 4 year degree, employers feel the need to test candidates for their knowledge?
No, CS degrees are designed to teach computer science. That's sort of vaguely related to "practical programming." Software engineering the way it's done in most companies is almost nothing like computer science and very much like a trade. The real problem is that programming trade schools are viewed as "below" a CS degree rather than a more directly applicable training/education.