Actually fixing this wasn't very interesting, by the way. It stood out in the code after we dug through it. It only showed up much later, which was the unfortunate thing. I forget why code review didn't catch it on the team that wrote it, but we were pretty much in crunch the entire time. It's very likely that things got glossed over, or reviews were skipped entirely.
Another thing I want to make a point of: programming is full of things that are unintuitive, non-obvious, and hard. Combine that with weird power dynamics that many aren't even thinking about and you can also get cases like this. If a more senior programmer handed you `rand() -> 4.` and you're not entirely familiar with what's going on, are you going to disagree with them? Maybe they'd think you know something they don't and implement exactly that.
I don't have a good way around this except to just try to always be helpful without assuming someone knows everything you do. That's not easy, it's frankly frustrating because you can end up explaining things you didn't know you thought were obvious. It's easy to convince yourself over time that there's some minimum level of knowledge everyone must have, but it'll never be true. If you're tired or burnt out, it can be even more exhausting. Still, better to try to be aware of all this than not.
A single-user instance for Noel Cower.