That is simply not true.
I can write you horribly designed code, "bad code" by every single rule of the art of coding, yet deliver a working application.
I can also give you a horrible design of cabling in your house, where I take the cable from the modem all the way up to the attic, down again to the cellar, 5x around the house, once accross the street, back to your garden, up to the attic again and then back down to plug it into your pc. HORRIBLE design of cabling. But your pc will work just fine and it will be able to access the internet despite this horrible cabling design.
See? It's not even dificult to come up with such examples. I can give you 50 more in a heartbeat if you want.