Gaining experience from small projects is focusing on achieving that. If you're learning to play the piano, you don't choose Flight of the Bumblebee as the first song to play; you keep it in mind as a long-term goal, and play simpler songs until you have the skill to move on to the next level and eventually get to where you want to be.
I do acknowledge that is one way of going about it, but as a person who's already gone through that way in another subject, I recognize it is a blind approach to learning anything. You can achieve far more better results if you study it first.
A good example of this is a Driving School. They give you a former training and a strict instructor to teach you properly on how to drive and behave before you hit the roads. Imagine if they'd just give you a car and say: "Go ahead, drive." without first teaching you the rules of traffic or even how to start the car. It would be a disaster of bad results. Same goes with almost any subject, including programming.
Because trial and error is one of the most powerful methods of learning. How do you know there's a superior way of doing things? Do you have a deep understanding of why it's superior? Maybe it's not the same for everyone, but programming is based almost entirely on intuition for me. All the book learning in the world can't compare to direct experience. In many cases, applying a design pattern to your code without having arrived at a need for it through trial and error leads to superstitious coding, which is never a good thing.
Trial and error is indeed powerful, but much more prone to producing bad results and low quality performance. In terms of putting out good results, trial and error learners are far slower compared to those who study before hand, due to them being stuck developing whatever through brute force, taking them away from the bigger picture.
There is a huge difference when someone studies and internalizes concepts before putting them to work as opposed to someone who just keeps bashing his head at the subject until it works.
Eventually, if they're smart enough, people who have been studying with trial and error methods long enough will realize how much wasteful moves they've made and the better results they could have achieved if they'd planned ahead. This is what happened to me.
On the other hand, to sit down and study before hand requires enormous amount of motivation to do so and most of the time people do have to go through the stage of trial and error learning to see the value of planning. So unless you can warn a new comer well enough to realize how wasteful trial and error is before he start learning that way, he won't be able to see the reason to study before hand.
As for how do I know something is superior to another method? Compare a simple drawing of a 3 year old to a artwork of a professional artist. The difference is that the artist has a massive visual library, concepts on how to draw properly (perspective, black/white values, depth) and tools to better plan out his work.
A more programming orientated example would be making a menu system.
You could just make a button that appears in the middle of the screen by putting in exact pixel coordinates or you could have it take into consideration the screen size and use that information to place it in the middle. The difference is that using pixel coordinates will only work in one screen resolution, while the other method makes sure it works equally the same on any screen.