It was a long time ago when code reviews were not yet standard practice everywhere. He was also protected by one of the few customer's employees in the team, who was almost universally hated, because they bonded over some controversial political views.
Yeah nowadays this code would never make it past a PR.