I don't find this is particularly true of self-taught people. People who are raised in bad coding environments like working alone or, project-based consulting shops may have bad habits. Hint: the habits are not taught in school.
My school tried to teach good habits. Many of the professors are out of touch with what good habits are though, so they usually teach to books of varying quality or practices specific to how they learned a few decades ago.
The right environment helps a programmer evolve through this stage.
In a similar vein, stay at home moms or dads may choose to send their child to daycare a day or two a week to learn how to interact with others. Without these learnings, life, or work, can be more challenging.
I do count school and University courses as self thought, just with a sometimes better fundation (but sadly often with a worth one too).
As long as you don't have someone who checks your code or does pair programming it's all self thought just with different sources of input.
Also school/uni projects tend to be not that useful either even if you do pair programming, because the people you pair up with have roughly the same experience like you (most times).
Besides, self-taught programmers have to work with others as soon as they get their first job.
* * *
Personally I think “schooling” should consist much more of student-directed projects, with scope, difficulty, and autonomy gradually increasing over time.
It’s a real shame that typically the most substantial pieces of work 18-year-olds are expected to complete in school take maybe 10 or 15 hours, and most of the work students do is broken down into atomized and unrelated chunks which individually take <10 minutes with few if any decisions involved.
1. Completely self learned people are more often prone to develop some bad habits or worse have some subtil but fundamental misunderstandings which are hard to get out of them. (in my experience)
2. Often just a view month with proper guidance can have much better effects then a year+ of self study or "isolated" experience. The problem most times not the general ideas but the details, wrt. the situations for which there are no clear rules you can "just" apply. And often making a wrong decisions doesn't matter that much and sometimes fall under "programming style", but there are hundreds of such small decisions and making many somewhat suboptimal decisions can easily pill up and cause serious problems.
Best example is KISS (Keep it Stupid Simple). Seems easy right, but what does simple mean? Is less code more simple. Are less sanity checks or maybe less validation more simple (due to less additional complexity in them)? Is using less abstractions more simple, even if more abstraction allow you to have code which is harder to get wrong when writing/changing it, _assuming_ you got the abstraction right? Is it more simple to sometimes just repeat yourself, or should you keep strictly to DRY? Is it more simple to sometimes explicitly write out type which would be inferred anyway? What about kinda unnecessary temporary variables? What if it's like `var valid = ...; if valid { }`? What about splitting functions, is it more simple to have 2 pseudo independent sub-functions you will not reuse or one slightly to large function where everything is in the same place?
The answer is always: It depends on the exact situation.
There is no clear cut definition of simple. The best would probably be based on code readability.
But then is it more readable to have one large function body or to split it into sub-functions which are well named but to which you have to explicitly navigate to "fully" understand all details of that function?
Sure we do have guidelines and they allow you to generally get it right (well ok, if you use some good guidelines, there are many bad ones, too). But there is a limit on how much you can learn from them and the rest needs practice. But many problems only show if you do large projects by yourself _and care to maintain and reflect on them, and come to the right conclusion unbiased by the programming language induced bubble you are in_ which is super time consuming. (So guidance is important, but hardly done as many companies do not plan in any time for that at all).