Software engineering is coding in context. Usually, that's a business context. Unfortunately, that will always come with constraints that means you cannot build the perfect codebase or the perfect product. There will be constraints on time, budget, design resource, testing resource, code review resource and all of these things means you need to focus on what is important and learn to let go of perfection. This can be heartbreaking sometimes and often can be incredibly frustrating, especially when you don't agree that the constraints in place mean the compromise you're being told to make.
Being a great engineer is working on this. Both your own reactions to business constraints and your pragmatism as a developer. Sure, you're there to be a voice for solid engineering, but you're also part of a company with goals other than your own. Working on that balance within yourself is a career-long journey.
Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!
You can catch up with all the other bytes at http://bytesofwisdom.com/