Modern games are written by skidiots who learned to do what they're told at university, always bundled with "extras" (spyware/crypto/bugs to be fixed later) that the board approve of because "We make more money this way". These games are also written on deadlines, with many things changed mid-development, and with certain features removed and added later as an addon. Compound this with working with a team of many others who may have a slightly different idea - it's going to be a hot mess. And remember, game reviewers need "wimp mode" to play these games, so of course they make it "idiot friendly".
Modern indie developers use engines like unity, rip prewritten scripts and "borrow" assets to make the same game we've all played a million times before, only with different art & audio work all for a few quick bucks on steam.
The software written by bedroom coders of the 80/90s - who would write software THEY wanted to see, on a time scale of their own, in a sensible programming language (assembler, or BASIC if you was slow).
As for why code standard in general is bad. In simple terms, back in the day you had a set amount of cycles & RAM to use which meant working within limits. The hardware was static across the board. Now developers say "If my game doesn't work on your computer, you need to get an upgrade", which is a cop out for "We don't know how to write in a decent language". I'll also add that they like to "borrow" code from others libraries - which are usually badly written in the first place.
End of rant.