While countries do generally specialize and trade according to comparative advantage, the extent of this is likely to be much less than what is postulated in theory because of the following limitations.
(a) Increasing Opportunity Cost
Due to the law of increasing opportunity cost, a country may lose her comparative advantage as she specialises further in the production of a good. This may be caused by the expansion of the industry that drives up factor prices, or when the industry expands into less and less appropriate resources.
(b) Factor Immobility
In order for a country to benefit from trade, she must be able to allow those industries in which she does not have a comparative advantage to decline so that resources can flow into those industries that are expanding due to rising comparative advantage. However, as factors of production are often not able to move quickly or efficiently into alternative uses, it is difficult for the country to fully realise the benefits of specialisation and trade.
For example, many Singaporean workers in the 1990s were unwilling to take up jobs in the expanding service sectors like hospitality and food and beverage even though they were retrenched from the more labour intensive manufacturing industries like electronics assembly because they perceived such service sector jobs to be relatively demeaning as compared to their former occupations. Many were also unable to take up jobs in the capital-intensive industries due to lack of skills.
(c) Transport costs
Even though it might be cheaper to import goods from another country that has a comparative advantage in producing that good, a country might still produce that good domestically if transport costs are high. This is more likely to occur when countries are separated by vast geographical distances, or if the value of the good is low relatively to its weight. So, it might be cheaper for domestic firms and households to buy domestically produced goods than to buy the imported variants of such goods.
For example, Singapore still produces building bricks even though the cost of producing such bricks may be lower in other countries. This is because bricks are heavy and hence the cost of transporting them is high, relatively to price at which such bricks can be sold. Similarly, Singapore still has a thriving furniture manufacturing market even though similar types and quality of furniture can be produced cheaper in other parts of the world.
(d) Protectionism
The theory of comparative advantage assumes that countries are able to specialize and trade freely without any form of trade barriers such as tariffs, quotas or restrictive rules and regulations. In reality, governments are sometimes pressured by domestic producers or workers to restrict imports in order to prevent job losses, especially in times of recession. Countries also slap tariffs and duties to correct trade deficits or to counter perceived unfair trade practices by their trade partners. Thus, countries resort to protectionism for political rather than economic reasons.
For example, in the global financial crisis, governments in US and Malaysia started a campaign to encourage their people to buy local products instead of imported goods.
(e) Strategic reasons
Countries may choose to produce rather than import certain goods because of the strategic importance of such goods. For example, it is not uncommon for countries to be self-reliant in basic necessities like food and also in weapons and ammunition as importing such goods may be difficult in in times of war. Thus countries often do not want to be dependent on the imports of goods which are deemed essential in times of conflict. For example, many farmer in Europe and Japan receive substantial agricultural subsidies and produce much of their food domestically, even though it is actually much cheaper for them to import food from developing countries which are more land and labour abundant. Many countries also heavily subsidize the development and manufacturing of small armaments and munitions and continue to sustain their production even though they have always been making financial losses in the production of these goods.