The compiler doesn’t care whether the code is ugly or clean. But when we change the system, there is a human involved, and humans do care.
A poorly designed system is hard to change. Hard because it is hard to figure out where the changes are needed.
If it is hard to figure out what to change, there is a strong chance that the programmer will make a mistake and introduce bugs.