Trade diversion occurs when a country enters into a preferential trade agreement, resulting in the shift of imports from a more efficient supplier outside the agreement to a less efficient one within the bloc. This can lead to suboptimal economic outcomes as it prioritizes political alliances over global efficiency in resource allocation.