I really think that they are used because it is easiest and cheapest fully legal filter. When you have significant number of candidates any filter that comes first to mind is selected. Degree is one such one that won't ever legally bite you.
In reality, holding a piece of paper has nothing in common with relevant ability. Some graduates will exit university as competent people, some won't.
This isn't exactly news, or even a recent phenomenon. My peers who finished their CS degree circa 2004 ish were a broad mix of utter idiots who shouldn't get a job in that field, or damn sharp (if green) technically-minded people, or somewhere in between.
The industry will sort them out; the ones that can, do, the ones that can't, will do something else of use, or find another job.
There is a correlation, that is all you need for it to be valuable. Remove the correlation and value isn't there any more, see US masters in computer science for example that one doesn't correlate with skill so it isn't valued, but the bachelor is. In countries where a masters is correlated with skill they are values though.