In that case I think we really do need the software engineering equivalent of the bar exam, as another commenter suggested.
In theory, if there was demand for it the private sector could fix this by issuing certifications. In practice certifications aren't especially useful or well recognized, as the sort of people with the best skills don't see any need to take them. It's much easier and lower effort to demonstrate your skills in an interview. See this thread - people don't have the time/will to do take-home assignments that are meant to consume a few hours, tops (and I totally get that, I wouldn't want to either). They certainly wouldn't be happy if you suddenly told them they all had to cram for and take some government designed exam that checked their knowledge of e.g. Java 1.4 otherwise they'd all lose their jobs!