This has been a good week for investors in the leading discount department store chains. Walmart (WMT 1.32%) and Target (TGT -0.70%) put out quarterly results this week, and both retailers came through with monster comps and better-than-expected results. 

Walmart had a great report on Tuesday. Target opened sharply higher on Wednesday with its own blowout performance. Why are these mass-market retailers holding up so well during a pandemic and a recession? Let's take a closer look at why Walmart and Target are killing it right now. 

An empty shopping cart in a store aisle.

Image source: Getty Images.

1. Walmart and Target never closed

Brick-and-mortar chains hit the brakes in March when shelter-in-place orders went into effect as the COVID-19 crisis became a stateside reality. Many traditional store operators had to close down, but Walmart and Target were allowed to remain open as essential retailers. Selling groceries, hardware, and other necessary merchandise kept their registers going while their suburban strip mall neighbors went silent. 

Customers kept coming, and they loaded up their shopping carts. For its fiscal quarter ending in early May, Target's 10.8% spike in comps was fueled entirely by a 12.5% increase in average transaction size. 

The point here is that as many retail concepts have since started to open up their shops -- after weeks, and in some cases months, of being closed -- Walmart and Target didn't skip a beat. They didn't have to retrain employees and communicate to the community that they were open. Consumers knew that Walmart and Target would always be there for their shopping needs.

2. E-commerce grew up during the pandemic

One of the biggest drivers in this week's one-two punch of blowout results out of Walmart and Target was digital sales. Walmart's U.S. e-commerce sales nearly doubled, soaring 97% for its fiscal second quarter. Target fared even better with digital comparable sales skyrocketing 195% higher. 

Walmart and Target were already making inroads in digital sales growth before the pandemic. Beyond internet sales off their sites of items shipped to your home, the convenience of in-store pickup on digital orders and more recently curbside pickup have given Walmart and Target the tools to keep connecting with folks who are hesitant to spend time inside a potentially crowded superstore. 

3. Travel and foodservice budgets have to go somewhere

How big was Target's latest quarter? Comparable sales rose a record 24.3% in its fiscal second quarter. Stimulus checks and enhanced unemployment benefits may have helped spark a temporary uptick in consumer spending, but it also helps that folks are saving money elsewhere. 

Your summer vacation plans likely fizzled out. You're not spending as much at restaurants or on live entertainment. We're in a recession, so it's not as if all of the money you had budgeted for travel, dining, or entertainment was spent elsewhere, but some of it must have been reallocated. Did you spend more to spruce up your home since you were going to spend more time there? How many board games and puzzles have you picked up? Walmart and Target have been gaining a larger share of your consumer discretionary income, and that was obvious in this week's monster reports out of Walmart and particularly Target.