Earlier this month, just about every department store you could imagine reported a Q1 sales decline. At the two biggest department store chains -- Macy's (NYSE:M) and Kohl's (NYSE:KSS) -- comparable-store sales fell 5.6% and 3.9%, respectively.

Sales fell at department stores like Macy's last quarter.

This sales slump didn't extend to off-price giant TJX Companies (NYSE:TJX), though. The parent of T.J. Maxx and Marshalls reported a stellar 7% year-over-year increase in global comparable-store sales.

To make matters worse, efforts by department stores like Macy's and Kohl's to protect their own margins could ultimately help TJX grow at their expense during the next few quarters.

Market share gains accelerate

TJX's Marmaxx business segment -- made up of Marshalls and T.J. Maxx stores in the U.S. -- accounts for about 65% of the company's revenue. However, in recent years, its growth appeared to be slowing. For the year ending in Jan. 2015, comparable-store sales rose just 1% at Marmaxx.

Given that Marshalls and T.J. Maxx are relatively mature businesses, it wasn't that surprising that their growth was slowing.

However, the opposite now seems to be occurring. In Q1, Marmaxx segment comp sales rose 6% year over year for a second consecutive quarter. Ironically, growth is accelerating at Marshalls and T.J. Maxx just as department stores like Macy's and Kohl's are recording their biggest sales declines since the Great Recession. This indicates that TJX is rapidly gaining market share.

TJX profits from chaos

Marshalls' and T.J. Maxx's strong growth in the face of plummeting department store sales shows just how much TJX benefits from chaos in the retail world.

In effect, TJX serves as a buyer of last resort for its more than 17,000 vendors. When supply chain disruptions (like last year's West Coast port slowdown), unexpected changes in demand, or other inventory miscues leave department stores and specialty stores with more product than they want, TJX steps in to buy the excess at bargain prices.

TJX can then offer great deals to its customers. This helps it drive more traffic to Marshalls and T.J. Maxx stores -- and away from department stores like Macy's and Kohl's.

Expect more share gains this year

Unfortunately for the department stores, the threat from TJX is likely to become more potent as the year progresses. In light of the recent slowdown in sales trends, many retailers are reducing their orders for later this year.

That will help them avoid margin-killing inventory pileups. However, vendors facing order cuts will probably be looking to unload excess merchandise at a big discount. TJX is likely to buy a lot of this inventory. It will then be able to undercut department stores' prices even further in its T.J. Maxx and Marshalls stores.

The retail inventory glut will continue to benefit T.J. Maxx for the next year.

Furthermore, due to weak sales of winter seasonal merchandise across the retail industry, TJX has gotten great deals on so-called "packaway" inventory in the past few months. These goods will show up in its stores during the upcoming winter season, allowing TJX to continue undercutting department stores on price.

Maybe next year?

The dynamics highlighted here show how difficult it is for department stores to compete with Marshalls and T.J. Maxx. Even chains that have been pretty careful about managing inventory (like Kohl's) will be hurt by the fact that their rivals are cutting orders and thereby giving TJX opportunities to pick up high-quality goods at cut-rate prices.

If department stores and specialty stores can keep orders and inventory in line with demand over the next year, the current merchandise glut will subside. In that scenario, conditions could turn more favorable by next spring.

TJX is a formidable competitor under any circumstances. But if other retailers' inventory miscues allow it to keep finding great deals, department stores will continue to suffer mightily.