Consider that such examples are often not about convincing, but teaching. That is, they often not trying to convince the reader, "Language X is better than language Y." Rather, the intent is more, "You already know language X, so here's some code in X. Now here's how you would do the same thing in Y." It's a pedagogical tool, rather than an argument tactic.