While that's bad news for the impacted workers and local economies in the closing locations, it's a necessary step for retailers as they refashion themselves to cater to an accelerating consumer shift toward online shopping.

Online and Upward

Year-over-year growth in U.S. e-commerce is outstripping sales at brick-and-mortar retail stores

Source: U.S. Census Bureau

Other players are also poised to benefit.

For one, there are industrial real estate investment trusts -- the companies that own the warehouses and distribution centers retailers need to facilitate all those web sales. Retail chains may be closing stores because they no longer need as much selling space to accommodate shrinking shopper traffic, but they require more space to house all the doodads they sell online.

And online retail is a busier business, as far as real estate is concerned. An e-commerce operation uses a fifth more warehouse and distribution space than a traditional brick-and-mortar store to accommodate millions of singly-packed products and a wider product variety than found at traditional retail outlets, according to Byron Carlock, U.S. real estate leader at consultancy PwC.

Every $1 billion of e-commerce sales drives demand for one million square feet of industrial real estate space, Carlock estimates. That same amount of sales at physical stores only drives demand for 830,000 square feet of real estate, he said. Prologis, the largest industrial REIT in the U.S. by market value, sees an even bigger discrepancy: It reckons every $1 in e-commerce sales requires three times the space of traditional retail.

With demand for warehouse space on the rise, shares of Prologis and peers such as DCT Industrial Trust and STAG Industrial are outperforming other North American REITs, as well as the broader stock market. That's a marked move for a group of companies that struggled to fill a glut of space that came online when the 2008 financial crisis stymied demand.

Industrious Industry

North American industrial REITs have been outperforming retail REITs and the industry as a whole, thanks to added warehousing demand from e-commerce

Source: Bloomberg Intelligence

It's no surprise Amazon, the e-commerce giant, is also a heavyweight where warehousing is concerned, accounting for over half the fulfillment centers in the U.S., according to real estate research firm Green Street Advisors. But traditional retailers like Home Depot, Walmart and Macy's are voraciously adding more warehouse space to accommodate growing online businesses. That's likely to boost annual demand for industrial space by 20 percent in the next few years, according to Green Street. Rents are already on the rise.

Industrial Upswing

National asking rent for industrial real estate

Source: CoStar

Note: Data for triple net leases.

Industrial spaces are also gravitating closer to cities to help e-commerce retailers meet rising consumer expectations for faster delivery times and cut down on transportation costs.

While it's clear to see the benefit for industrial REITs as more consumers shop online, some retail REITs also actually stand to gain from closures at Macy's and other department stores.

The exit of a big anchor store could certainly kill a mall on its last legs, triggering contract clauses that let other tenants out of their leases and launching a vacancy death spiral. But it could also allow mall operators to make better use of good spaces by re-purposing them with higher-paying tenants.

Department stores tend to pay less in rent because they are supposed to be traffic-driving anchors. By getting out of those leases, mall landlords can find other uses for the space, such as movie theaters or restaurants.

Some mall owners are already finding more creative uses for their spaces. From climbing-wall gyms and blow-dry bars to colonoscopy clinics and data centers, non-retail, non-restaurant tenants made up 22 percent of shopping-center space last year, up from 19 percent in 2012, according to data from CoStar and ICSC.

Alternative Retail

Share of shopping center space that isn't dedicated to retail or restaurants

Source: CoStar, ICSC

The retail landscape is certainly undergoing a lot of change. But as the saying goes, when one door closes, another one opens.

This column does not necessarily reflect the opinion of Bloomberg LP and its owners.