I've literally experienced this exact gut reaction two times in the last couple of months at two different companies. Code that is working fine, might need a bug fix here and there, is deemed worthless and should be rewritten. These we're tiny dev team: 3, 4 people max, so it happens everywhere I guess.
It does not happen everywhere. It happens in companies lacking sufficient years of experience building software, without good management. It's so common as to be almost universal in engineers with less than 5 years of experience to encounter some important piece of software that they think is ugly and poorly written and embark on a massive rewrite that they think will fix all the problems.