As a rhetorical trick, it is simple. Anyone can do it, and we are all tempted sometimes. When you have lost an argument - when you can't justify your case, and it is crumbling in your hands - you snap back: "But what about x?"*h/t to Butterflies and Wheels
Hari's rebuttal concerns the "first-level" argument: thus-and-such is bad. He mentions specifically the conditions of de facto slavery in Dubai. Slavery is bad; responding to criticism of slavery by pointing out the critic's own failures is the essence of the tu quoque fallacy.
There are, however, different kinds of arguments where pointing out the critic's own failures is legitimate: specifically when the failure of one system (or culture or ideology) is used as evidence for the superiority of another system.
This issue comes up often discussing communism and socialism. It doesn't seem at all controversial that a shitload of people died* under Stalin's rule of the Soviet Union and under Mao's rule of China. No one — not even the most dedicated Marxist-Leninist-Maoist communist — wants a shitload of people to die. It is equally uncontroversial that we must discover precisely why these people died and make whatever changes reasonably foreseeable to prevent excess deaths.
*excess deaths; i.e. by other causes than old age and other ordinary causes of death
The criticism, however, does not simply stop at noting the specific failure. It goes on: that a shitload of people died under Stalin and Mao is evidence that communism and socialism are failures.
"But what about the shitload of deaths under capitalism?" asks the communist.
"Oh, that's just a tu quoque fallacy," responds the capitalist critic.
Bullshit. The communist is not trying to justify these deaths, he's rebutting the argument that these deaths show the superiority of capitalism over communism.
I know no small few "apologists" for Stalinism and Maoism. There are always a few fringe weirdos, but the overwhelming majority of those who admire Stalin and Mao* do not say, "Oh, those people were bad and deserved to die." They do not say, "Well, you can't make an omelet without breaking eggs; their deaths were justified as a sacrifice to implement socialism." To impute such position to admirers is an egregious slander.
*I myself am still mostly agnostic on the issue. Of the two, Mao seems more admirable overall.
The vast majority of admirers hold the position that these deaths are primarily* a combination of a) factors outside the control of these leaders (e.g. droughts, the initial conditions of extreme poverty, the imminent invasion of the Soviet Union by the capitalist west) and b) these leaders' mistakes and errors (e.g. Mao's Great Leap Forward), errors that absolutely should not be repeated.
*There are other contributing factors outside the scope of this particular post but that also deserve detailed critical analysis.
Many self-described communists and socialists hold a similar position to capitalist critics of socialism: that we have no more to learn from Lenin, Stalin and Mao than we have to learn from Hitler: That the Soviet Union and the People's Republic of China have no more to do with communism and socialism than Nazi Germany.
The problem with this position is that seems extraordinarily difficult to implement socialism — in the sense of "lower" communism, a transition from capitalism to "higher" communism — without examining both the USSR and the PRC and replicating many, but not all, of their innovations. To simply consider the USSR and PRC "irrelevant" means that we should do nothing at all that they did: that the USSR or PRC did X is prima facie evidence that X is bad.
The most obvious "somethings" that the USSR and PRC have in common are a revolutionary overthrow of the bourgeois state and centralized control of the economy. The facile dismissal of the USSR and PRC is thus used to justify not overthrowing the bourgeois state and not centralizing control of the economy in any way. But abandoning these principles surrenders communism completely to the essence of capitalism: if you're not a revolutionary and an advocate of intelligent economic centralization, you might as well stop dishonestly calling yourself a communist or socialist and join the Green Party.
The first kind of surrender is reformism, that the bourgeois state can be reformed from within, by participating in and upholding the essential structures of the bourgeois state. But these structures are fundamentally and intrinsically instruments of class oppression; they cannot be reformed from within. Even if some progress is made, we know from dismal and bloody experience, such as in Indonesia and the United States, that the bourgeois state will just suppress, imprison or kill the communists. The bourgeoisie has power, and they have read Machiavelli. They will not voluntarily and peacefully give up that power. The bourgeoisie will oppose by force any attempt at undermining their power.
The only justification for "participating" in the bourgeois state is to explicitly and openly oppose it from within, as the Russian communists did with the Duma in the early 20th century. Their delegates used their elected positions not to participate in parlimentarianism, but rather to use their privileged position to call openly for the destruction of the bourgeois state, including the Duma. If you cannot use "participation" in the bourgeois state to directly, openly and explicitly undermine and destroy it, participation is unjustified.
The second surrender, opposing economic centralization, is at best a Utopian fantasy and at worst support for the essence of capitalism: private, individual ownership of capital.
I have been told most emphatically that, "Socialism is the workers owning the means of production." But what does this slogan actually mean? Does it mean each individual worker owns the physical (constant) capital she actually uses? If so, does the worker who owns a lathe in an automobile factory have the right to use that lathe to produce model railroad parts instead of crankshafts? Once you collectivize production above the individual, you are centralizing: the point at which the centralization becomes "unsocialist" in principle is completely arbitrary. And if ownership of physical capital really is individual and private, in what sense is one not upholding the essence of capitalism: the private ownership of capital?
Similarly, ownership is the right to use. If any external restrictions are placed on an individuals use of capital, her ownership is compromised: some ownership accrues to the individual or institution enforcing the restriction. If I cannot transfer an object as I please, rent it as I please, loan it as I please, or even destroy it as I please, I do not fully own it. I own it only to the extent that I can use it as I please. Again, making any restrictions on the use of capital entails some centralization: the point at which the centralization becomes "unsocialist" in principle is completely arbitrary.
Furthermore, centralization happens whether we like it or not. It's hopelessly Utopian to just declare "no centralization" as if by magic. Such a position is fine in a work of fiction, but it ignores the present-day reality of our material circumstances and economic relations. Our only choice is to centralize intelligently and intentionally; the alternative it to simply let centralization happen... and we can see today the effects of centralization without social intention (or with a catastrophically dysfunctional kind of social intention).
How much centralization is best, which decisions should be centralized, is a pragmatic* question, a question to be decided as to what best implements the fundamental principle of "lower" communism: elimination of the exploitation of the surplus value of labor. The only way to intelligently answer this pragmatic question is to critically — but not dismissively — examine those societies that have intentionally centralized their economies at least purportedly for socialist goals. And we have only two examples large enough that their decisions can be considered independent: the USSR and PRC. We do not have to slavishly emulate them, but if we simply dismiss them out of hand, we ignore valuable empirical** evidence and risk slipping into idealism and Utopianism.
*In the broader, all-sided sense of "pragmatism" not restricted to narrow expediency.
**Again, in the broader, all-sided sense of "empiricism" as substantiated by experiment and experience; not restricted to narrow and naive positivism.