Are lower compensation costs and lack of unions in foreign countries considered unfair economic advantages?

Legally, these are not unfair economic advantages. In the eyes of many people in richer countries, they are unfair advantages.

There are various agreements made by various countries as to what constitutes unfair barriers to free trade and unfair competition. For example, it is considered illegal to “dump” products for below their market value. Low wages and lack of unions are not considered to be unfair. Instead, this has long been a major reason for businesses to relocate. The Southern United States is attractive to many employers today because it offers lower wages and few unions. This causes some employers (Boeing did this) to move some jobs to the South. Jobs are also moved overseas for this reason.

However, people do get very upset about the fact that other countries can outcompete the US in these ways. They do feel that this constitutes an unfair economic advantage. They feel that the other countries are simply undercutting the US and that the US should prevent offshoring of jobs to those countries.

Thus, while people feel that this is unfair, it is not illegal, that is, it is not legally unfair.