Given your other comment I suspect you're speaking from an observation bias leading you to judgement about the general case that doesn't necessarily stack. You witness those who've made it as devs, but that doesn't tell you anything about those who didn't.
The important question is of those who self-learn, how many of them end up as decent developers, vs those who go through a formal CS ed. Or to re-frame, what's the better course for the majority of people who want to become developers? I don't know of any numbers on this, so can only go off what I've seen, and what I've seen is that for the average person considering dev, a CS education is the best option.