This comes to a question of values. Do you build things because you want money? or do you build things because you enjoy the beautiful end product?
These two are not mutually exclusive, and neither is superior to the other in a vacuum. Obviously, if you are running a business, then you must value the money. If you hope to make your users and fellow engineers happy, you probably should value the beauty.
How much each drives your decisions is ultimately subjective and personal.
There are ugly codes that have made hundreds of millions if not billions.
I rather ugly/sucky code that makes money over beautiful code that doesn't. I've grown to love money making ugly code.