This is a nice lesson for a novice programmer to let sink in. That software is written by humans. Mostly clever people but not infallible. And subject to all kinds of tradeoffs. They call it computer science at university, but most of the time we are craftsmen working on buildings evolving as we go.
I recall my personal eureka moment in this regard. 2001, final year of university, writing Java code for my thesis. Downloaded the source code for the official Java APIs, I think it was, to better understand how they worked. I was genuinely surprised by the amount of critical comments and "fix this" comments strewn throughout the code. It was a great learning experience and took the pressure off my shoulders to be "perfect".