Yes, that bit about horrible code that caused such distress to an MSc student was particularly bad. Personally, I wouldn't be caught dead releasing that kind of code. It's not like there's a deadline for releasing code, most venues don't require it and it usually takes months for the review process to complete at conferences (years even in journals). There's nothing stopping one from working on the code at a leisurely pace once a paper is submitted, then releasing the code whenever it's fit for public presentation. There is no social contract that says you have to publish exactly the code that was used to produce certain results, just show that there is some code that does what your paper says it should. And if a precise record of what was done when is needed- well, that's called "git".
But I guess part of the problems with "publish or perish" is that there is very little incentive to keep working on code after a paper is submitted.
Edit: So, I spent a few years in the industry before starting my PhD so code quality was important to me especially because my first proper job was in a shop that did code reviews and all. How did you get to appreciate the need for good coding standards? And how did you learn how to do it right? If you don't mind me prying! :)