Retailers are closing up shop. Here's why...

Another day, another retailer trimming its store count.

On Thursday, J.C. Penney said that it will close 40 of its locations—about 4 percent of its stores—this year. Then Macy's said it would close 14 stores in early spring. The announcements came one day after teen retailer Wet Seal said it will shutter about two-thirds of its 500-plus stores, and a bankruptcy judge in Delaware ruled that Deb Shops can shut down nearly 300 stores as part of its liquidation.

These are far from the only retailers whittling down their square footage.

A JC Penny department store with a store closing banner last April.
Robert Barnes | Getty Images
A JC Penny department store with a store closing banner last April.

When it filed for Chapter 11 bankruptcy protection last month, teen name Delia's said it will seek court approval to close all of its stores.

Also last month, Aéropostale said it would close 120 stores soon, a significant increase from the 40 or 50 it had originally planned. The company will also close about 125 of its P.S. by Aéropostale children's stores by the end of the month.

Sears, which is trying to turn around its performance after a string of declining sales reports, said last month it would accelerate the number of closings during the year, from 130 to 235.

And RadioShack, which is negotiating with lenders to gain approval to shutter 1,100 stores, said last month that it had closed 175 locations in 2014.

Several macroeconomic factors are driving this push toward a smaller store base, analysts said. For one, retailers simply have too many stores, particularly as more consumers shop online. For another, the demographics no longer make sense for stores to exist in certain suburban locations, as more young Americans are flocking to cities and staying there longer.

But it's more than just external factors. Many of the retailers closing stores are facing company-specific problems that in some ways forced them to downsize.

"When you have a fleet of 1,000 stores, you're going to have some in lousy locations," said Craig Johnson, president of Customer Growth Partners. "That's a tiny subset of the issue."

Supply outweighs demand

One of the biggest issues is that retail is simply overstored, Johnson said. He attributed this supply versus demand imbalance to the fact that retail sales growth has been too tepid to account for an increase in retail real estate. The situation developed even though 2014 saw limited new construction, according to Jesse Tron, a spokesman for the International Council of Shopping Centers.

"If we start most broadly, you have a retail sector that has basically been in slow-growth, no-growth mode for a number of years," Johnson said. "Meanwhile, store square footage has kept expanding."

Location also plays a role. Belus Capital Advisors analyst Brian Sozzi said suburban markets are particularly vulnerable, as more Americans move into cities. He used Target as an example; although the discounter announced a round of store closures in November, it's also opening new stores in urban markets.

Johnson added that mall-based locations are facing greater challenges than off-mall concepts, which are stealing share.

Read MoreLong live the Web: Online sales top expectations

It should also come as no surprise that the rapid growth of the Web is causing a traffic decline at physical stores. Johnson said that for the merchandise category, online sales now account for about 13 percent of all retail sales.

Not everyone is hurting

While there are certainly external factors to blame, it's important to note that the companies shuttering a large quantity of stores are also victims of their own mistakes.

For example, much of the trouble facing teen retailers is the fact that their target demographic no longer finds their product appealing. Instead, they've begun shopping at fast-fashion stores such as H&M and Zara—which, in contrast, are growing their U.S. square footage.

Read MoreStop blaming store size for weak results: DDR CEO

In a similar vein, Johnson pointed out that department stores' woes are due, in part, to the fact that their overall share is shrinking. A few years ago, these big-box locations accounted for well over 10 percent of the retail market; now, it's about 3 percent, he said.

"[J.C. Penney] has to shrink the size of its store base to fit the addressable demand that it can reasonably capture," he said.

Not all store closings should be viewed as a sign of distress for the retailer. That's because the beginning of the year is when most retailers evaluate their portfolios. According to preliminary estimates from ICSC, about 45 percent of last year's announced store closings occurred in the first quarter.

Companies that close underperforming stores to strengthen their portfolio stand in sharp contrast to names such as RadioShack, which "need the store closures to stay alive," Sozzi said.

Although analysts have long been calling for retailers to trim their square footage, it does come with pitfalls. Closing a store cannot only cause someone to switch to a competitor—it can also limit a company's distribution network.

Read MoreClear message from retail earnings: Close stores

"If you're aggressively closing stores, well now you can't do this ship from store," he said.

Where there's death, there's life

The past four years have seen the death of more than two dozen indoor malls, with another 60 teetering on the edge, according to data from Green Street Advisors that was first reported by The New York Times. But ICSC's Tron said he does not foresee a year when the industry will post a net decline in retail space.

He added that occupancy rates were at 92.5 percent in the third quarter, which is back above prerecession levels.

"We kind of see this every year," he said. "[In the] first quarter a bunch of stores close and there's a little bit of panic. And then new retailers emerge."

Read MoreInternational invasion: Retail's newest tenants

Among new tenants filling these vacancies are gyms, minute clinics, clicks-to-bricks concepts such as Rent the Runway, and international retailers such as Primark. The latter signed a deal for space in seven Sears locations last year.

"For all these deaths there will be life," Sozzi said.