Cross-browser compatibility is often the reason "good code" turns into messy code!
You develop in one browser, and then make adjustments to it to make sure it works in all major / mobile browsers. This step often introduces some dubious workarounds and mess because it can be such a painful process.
That isn't to say one shouldn't try to write re-usable and maintainable code in the first place. But I also agree with your more general point (just not in css), that neat/maintainable code != correct code.