That hardly has to do with code quality, but instead that some edge-case "features" were not anticipated by the game designers, programmers and QA team, but "discovered" later by speedrunners.
It's not just subtle floating-point errors either, but also outright wrong maths that appears to work (see [1] for an example), memory leaks [2], buffer overflows [3] etc.
[1] https://www.youtube.com/watch?v=4gNYTqn3qRc
[2] https://news.ycombinator.com/item?id=20410166
[3] https://arstechnica.com/gaming/2021/03/how-to-beat-paper-mar...
They weren't coding for some NASA space probe and they knew it.