"The 5000 lines of if else that handles the menu state is a striking witness to this insanity."
I can say, quite confidently, that was probably some junior developer who built the shell. It is always some junior developer that builds the shell. And it was a designer/director that didn't know what they wanted until just prior to putting the gold master in an envelope to send to the pressing house. Also the shell is completely throw away code that will never, ever be used again in any other game.
"Each time by a different set of developers that somehow had to make sense of this mess. The code still contains many of the remains of what came before. There was never any time to clean it up."
Exec Producer at publisher: "Hi, here's $25,000, can you port Wipeout from this platform to that platform? We'll give you another $10,000 if can do it by this date, and another $25,000 three years later if the port sells so many bajillion copies.
Desperate Studio Producer: "Absolutely can do that, let me find two cheap programmers to take care of that. Hey guys can you spend the next two months crunching like crazy with unpaid overtime to help me keep my boss happy and get that promotion? There will be a significant reward (a two pizza pizza party) if you can hit this release date."
The two developers then spend an inordinate amount of time trying to get the damn project to build and find some obscure missing header files, layers on more hacks and ships in the 11th hour.
And the rest is history. And nobody ever looks at the code ever again. Until the next poor programmer has to port it to a new platform.