Browsing the source of games like Nethack and Battle for Wesnoth (around a decade ago) opened my eyes - sometimes code quality can seem poor but the product can be great.
Blender is another one that seems very ramshackle and complex. I won't go as far as saying it's poorly written, but it's a product of many contributors, including students, and yet it's an amazing piece of software.
This thread is not meant to be a criticism of projects, but a celebration that code quality is not the be all and end all.