Just remember there is not "right" way to do something. There are many wrong ways, many ok ways, and a few good ways to solve most problems. I will get knocked for this but the ROI for perfect code is not worth it because it doesn't exist. Only good code and bad code. As a programmer you have to strive for the best code quality you can in the time given. How much it pains me to say it, we are in the business of shipping software. If we don't we don't make money. Before I kill your spirit, striving for perfection is something you should always do just don't let it get you down if you can not always get there.
I will get off my little box now and actually answer you question.
I was much like you on theory. In college I was great in my practical classes but always had trouble with the theory classes. This was because during college, I did not see the importance of it. Now that I work in the real world, it has become clear as to why it is important. Knowing the theory behind a subject makes it easier to know if you are going down the right road when solving a problems. It allows you to work at a higher level than code (more general) when working through a design of a system. If you think only in code, it is possible to become short sighted with solutions.
Are you doing it wrong? No. You have noticed an area you could be better in. You have done the hard part and that is seeing an area you could be better in. Keep it up. The development community needs more people who care enough to get better.