Like the "infant industry" story - what if that tariff allows a temporarily inefficient industry to achieve scale economies and efficiency gains that allows it to compete on global markets? If you remove the tariff too soon, you may lose the industry and good-paying jobs. But as long as you have the tariff, consumers pay more for the good in question. The devil is in the details here.
Or like the other stuff people have mentioned here - the global labor arbitrage for example. Again, it's a question of balancing potential gains from specialization against other costs, which I admit economists are not always clear about.
Also, one of the problems with economic policy analysis is that distributional considerations are usually ignored. As long as a given policy change (net) results in enough increased output to potentially compensate those who lose from the policy change, economists will usually say that the policy change should happen, even if all the benefits went to Bill Gates and all the costs were imposed on everyone else.
So, no, "free trade" (and of course there is the problem that "free trade" has become such a politically loaded term that it doesn't mean the same thing to different people) in the sense of moving in the general direction of more openness by reducing tariffs and other trade barriers (my definition of "free trade") doesn't always make things better for everyone, but that's different than saying comparative advantage doesn't permit overall increases in output and income (which could and should then be used to compensate those who bear the costs through jobs programs, investments in education and training, and a generous welfare state).
Mathematical models do not have moral content: it's the polemic constructed around the models that does.
Within the same context, a Kaldor-Hicks improvement is defined as a change that is either a Pareto improvement or such that: the "winners" from the change would be able to compensate the "losers" and still be better off (Kaldor criterion); and the "losers" could not afford to bribe the "winners" to prevent the change (Hicks criterion). Crucially, the compensation or bribe elements of the test for a Kaldor-Hicks improvement is a hypothetical one: the change is considered an improvement if the assessed winners' gain is greater than the assessed losers' loss, regardless of whether the change when implemented would actually involve the payment of any compensation.
Often Pareto optimality is an impairment to taking any action (see the effects of unanimous decision making in teh EU council, for instance), but then sometimes people just say "but see, it's not Pareto optimal but it is Kaldor-Hicks optimal, so it's ok, we can ignore the losers". guaranteed to evoke a violent reaction from police is to challenge their right to "define the situation." --- David Graeber citing Marc Cooper