Courier New, with all its unfortunate quirks, is there for a reason, AFAICT. It copies the typewriter font metrics. There are many situations where texts are measured by the number of "standard typewriter" characters and lines, established like 100 years ago.
Using Courier New for code samples is not a great idea. I think it comes from the times when good monospace fonts did not yet exist. I always change this default, andvi wish browsers somehow stopped clinging to it.
It's unfortunate Courier New is both so badly different from the regular fonts (and so bad at all, by the way) and also the default on Windows.