Airlines long ago cottoned on to the fact that being part of an alliance could save them money and help them offer passengers a greater variety of routes.
Container-shipping companies have taken a little longer to figure this out - but are now copying the strategy wholeheartedly.
Until recently, there were four major container-liner alliances - but that industry structure is now rapidly shifting as dwindling freight rates - the result of the industry ordering too many ships - savage profits.
The latest love-in came last Friday when Germany's Hapag- Lloyd said it would form an alliance with five Asian carriers. AP Moeller Maersk and Mediterranean Shipping, the world's largest container-shipping companies by capacity, are already bosom buddies - their alliance is called the 2M partnership. The next two largest liners, CMA CGM and Cosco, are among a group that last month formed the Ocean Alliance. Like the airlines' code-sharing agreements, these vessel-sharing partnerships help to cut costs and better use spare capacity.
They allow companies to offer more frequent services - without buying more ships or adding new routes. They can instead share space on other alliance members' vessels.
But you need only to look at the profitability of Europe's legacy airline carriers to know that joining an alliance gets you only part of the way. United States airlines are far more profitable than their European peers. The reason? There are fewer of them. Following a wave of consolidation and bankruptcies, just four airlines control more than 80 per cent of US commercial airline traffic.
In contrast, Europe's airline industry is far more fragmented: Lufthansa, Air France-KLM, IAG, Ryanair and easyJet together have less than 50 per cent of the market.
Container-shipping companies are a proud bunch - national or family interests tended to preclude takeovers in the past. But that's started to change.
Cosco and CSCL have joined forces, Hamburg Sued bought CCNI's container-line activities last year, CMA CGM is buying Neptune Orient Lines, and Hapag-Lloyd is talking to United Arab Shipping about a merger.
A once-fragmented industry is becoming dominated by large players, with the top 10 already controlling almost two-thirds of capacity, compared with just over a third 15 years ago.
Fitch Ratings thinks more mergers and acquisitions are "inevitable" as looser alliances can't fully exploit opportunities to boost capacity utilisation and cut costs. Consolidation bodes well for an eventual recovery in industry profitability because smaller players may struggle to compete and bankruptcies would take capacity out of the market.
But less competition in shipping isn't good news for exporters who currently benefit from low freight rates.
Smaller countries may come to rue the wave of consolidation because they may be left with less choice about who transports their goods. Again, the experience of US airlines is instructive. Passengers there now have fewer airlines to choose from at their local airports, and fares have risen.
So while it's tempting to pity the container-shipping industry's current plight, that sympathy may not last forever. Competition regulators should be on alert.
•This column does not necessarily reflect the opinion of Bloomberg LP and its owners.