That answer was posted in 2012 to a question posted in 2009, and the Stack Overflow of those years was a completely different place to the Stack Overflow that exists in 2020.
In 2009, Stack Overflow hadn't even existed for a year. Pretty much any and all questions were accepted (as long as they were obviously about programming) because the site was trying to grow.
By 2012, Stack Overflow was much larger, but still an extremely niche site that was mostly populated by the relatively small number of enthusiast and professional programmers who were its original target audience. As such, it was a far more cohesive community than today, and as such, far more permissive of such shenanigans like the answer you've pointed out. Since the question had already been answered way back in 2009, there was little chance of a new answer causing any confusion, and the community as a whole made a value judgement on that answer: while it did not conform to the rules for content quality and therefore should not have been allowed to remain, its amusing nature outweighed the rules around quality, and thus it was preserved.
Then in 2012 the summer of love happened, and the standards for entry into this community dropped through the floor. More and more users who were not enthusiast or professional programmers, just grunts looking for a solution to problems they weren't smart enough to figure out, started posting questions on the site. Bad questions, that attracted similarly bad answers from other grunts who didn't actually know what they were talking about. Questions and answers so bad that the previous relaxed atmosphere had to be left behind and the rules enforced strictly, or the site would be so flooded with trash that there would be no room for actual quality content.
On top of that, the huge number of new users disinterested in being part of a community diluted the existing Stack Overflow community so far as to effectively destroy it. A community that is no longer cohesive cannot have a consensus within that community on how to treat questions and answers; it can only follow rules that are formally codified. And those rules state that content like that answer is not permitted on Stack Overflow.
Thus we come to 2020, where Stack Overflow is a mere shadow of the incredible place it was until 2012, and the only reminder of those glory days are rare Meta questions like these. Don't write an answer like that one to a question, don't even think about it - the tyranny of the masses has killed the joy that this site once brought to so many.