Over the past couple of years, J.C. Penney's (NYSE:JCP) financial results have gone from bad to worse. Macy's (NYSE:M) has done a little better, returning to comp sales growth in late 2017, but sales trends slowed last quarter and its pre-tax margin has continued to sink.

Executives at both companies are working to drive better sales trends (and thus better earnings results). Macy's is further ahead in this respect, while new J.C. Penney CEO Jill Soltau is still finalizing her strategy. However, both chains have also announced a handful of store closures this year as part of their turnaround plans. And while maintaining scale is important for Macy's and J.C. Penney, there are probably a lot more store closures ahead for both of them.

Check out the latest earnings call transcripts for J.C. Penney and Macy's.

A look at why Macy's and J.C. Penney are closing stores

Macy's closed more than five dozen stores in 2017. Its store closure activity has moderated since then. Earlier this year, Macy's announced that it would close eight stores in 2019. Most of the eight stores are in oversaturated markets where the company likely has too many locations. (In fact, four of the stores set to close are within five miles of another Macy's store.) The only real exception was the Macy's store in Casper, Wyoming, a small market that the chain is exiting.

The exterior of a vacant former Macy's store.

Macy's closed a large number of stores in 2017. Image source: Macy's.

Meanwhile, J.C. Penney announced in January that it would close at least three stores in 2019, but hinted that the number would probably be higher. Last week, it confirmed that it will close 18 full-line stores this year, as well as nine home and furniture stores. Management indicated that these stores have low sales productivity and are facing steep comp sales declines.

J.C. Penney hasn't provided a list of all the stores it is closing, but the identities of most of the affected stores have trickled out in the past few days. Many of the stores are in struggling malls that have already lost one or more anchors, such as Cary Towne Center in Cary, North Carolina; Midway Mall in Elyria, Ohio; and The Orchards Mall in Benton Harbor, Michigan. Others are small-town stores or stores that the company has probably sold for redevelopment.

It's also no surprise that J.C. Penney is closing nine home and furniture stores. The company recently decided to stop selling appliances and move to online-only sales of furniture (except in Puerto Rico). The remaining merchandise from these locations can be consolidated into nearby full-line stores.

Lease expirations could drive further store closures

While Macy's and J.C. Penney own many of their stores, they also lease hundreds of stores from mall owners and other landlords. It rarely makes sense for either company to close a store if it would have to continue paying rent for that location.

As a result, Macy's and J.C. Penney haven't eliminated all of their underperforming stores. But as store leases expire, it makes more sense to close locations with weak sales trends. That means investors should expect both chains to continue closing a handful of stores each year for the next few years.

Balancing real estate value against retail value

A second factor that could cause Macy's and J.C. Penney to close stores is that the real estate value of many of their stores outweighs the value of keeping them in operation.

Executives at both companies have noted that having big store fleets is important for holding on to customers who may use nearby stores for online order pickup and returns. That said, there are many markets where Macy's and J.C. Penney have numerous stores and could close some while still giving customers plenty of convenient options. (That's especially true for the dozens of home and furniture stores that Macy's still operates.)

Given that certain stores could be quite valuable to mall owners or other real estate investors, it makes sense for both struggling department store operators to opportunistically sell and close some stores in the coming years. Finding sources of cash is particularly urgent for J.C. Penney, which is carrying far too much debt.

The exterior of a JCPenney store.

J.C. Penney may want to sell some of its more valuable stores to pay down debt. Image source: J.C. Penney.

What happens in the next downturn?

The third and most important reason why Macy's and J.C. Penney are likely to close a lot more stores in the years ahead is that industry conditions will worsen in the next economic downturn. Stores with steadily declining sales today will presumably see even faster sales erosion in a period when consumer spending isn't rising quickly.

Moreover, both chains primarily operate mall-based stores, making them reliant on the health of those malls. If a slew of other tenants shutter their locations at a given mall due to plunging sales, it will make a lot less sense for Macy's or J.C. Penney to stick around.

There is certainly some logic for the department store chains to maintain broad store footprints so they can stay close to customers. However, smaller stores or entirely new store formats may be more appropriate ways to meet that goal. Keeping enormous stores in sick and dying malls doesn't make sense in the long run, and that means Macy's and J.C. Penney still have a lot of store closures ahead of them.