Yup, they shipped a debug build. Here’s a video that shows the build side-by-side with one that was compiled with compiler optimizations: https://youtu.be/9_gdOKSTaxM
It was quite laggy in certain areas, particularly the submarine sank the framerate quite considerably.
True, there were several programming mistakes that caused undefined behaviour. Most of these the compiler warns about though, so they could have easily been fixed.
The issues were “masked” so to speak by the debug build (even if not fully gone, the game could still crash). But decompiling the game let modders fix those issues fairly easily, after which it could be recompiled with the proper optimizations.