But as your career continues, you'll find that you are _always_ learning, and in that process of learning you, too, will do the kind of stupid shit that someday a wiser you will wish you'd done so, so differently. The point is, in time, people and organizations of all sizes build legacy. Yes, even startups. You should actually feel pretty good if you work on something that lives long enough to develop a few warts.
There are two related skills you really have to work to build. The first is the discipline to set time aside to fix the broken things. You'll be surprised how hard that can be. (ESPECIALLY in a startup.)
The second will be tolerance; the ability to accept that, yes, some things are totally wrong in the purest academic sense—and maybe embarrassingly so—but at the same time, they are working and the best customer outcome may be a focus on some other feature.