CVS Health (NYSE:CVS) announced earlier this year that it was closing 46 stores that weren't performing well. The closures were in several states, and investors recently learned that the company isn't done shuttering stores -- it's planning to close another 22 locations next year. 

The company has been performing well

Store closures are normally executed by a company that's underperforming or bleeding money and needs cash. However, that's definitely not the case with CVS as it has generated more than $10 billion in free cash flow over the past four quarters, and during that time, its operating income totaled $11.7 billion, while net income was a very strong $4.5 billion. 

The store closures aren't happening for financial reasons but instead because the company is executing a significant strategy change.

CVS is undergoing a transition

The turning point for the company likely came about a year ago, when its merger with health insurance provider Aetna finally closed. Originally, the two companies announced they were coming together a year earlier, in December 2017, but it took a while to get the necessary approvals for the deal to go through. As a result, CVS has been planning to revamp its stores to add health services as part of its offerings to customers, including helping patients who have been discharged from hospitals and assisting those with certain chronic conditions. 

Various medical products on pharmacy shelves

Image source: Getty Images.

It's part of the company's broader shift toward experience, which CEO Larry Merlo sees as a big opportunity for CVS to differentiate itself from its competitors. Last year, he said:

We're making the consumer experience, which will be an increasingly important competitive differentiator, and we are hard at work creating a plan to differentiate CVS Health in these patient journeys with the goal of making them simpler and more personalized while making care more accessible. 

How do the store closures factor into this strategy?

CVS closing its stores is simply a way for it to tighten up its operations and get rid of stores that aren't performing well. With approximately 9,900 stores throughout the country, CVS can afford to cut the combined 68 stores over a span of two years and not see a drastic impact on its overall performance. At less than 1% of its total stores, it's a very minor haircut to the company's overall operations. Even with 46 store closures taking place in 2019, the company still raised its guidance for the year when it reported its Q3 results. 

One of the reasons the company isn't worried is because it's overhauling many of its stores into HealthHUBs to provide more of a focus on health than retail. With dietitians on hand as well as wellness rooms where people can participate in yoga exercises, the company is going to be significantly changing how many of its stores look and feel. It's estimated that about 1,500 stores will undergo transitions into HealthHUBs.

By closing some of its locations and shedding those expenses, the company can better direct those funds toward transitioning other stores into HealthHUB locations and other strategies that better support the company's new goals.

Why these moves make CVS a better long-term buy

Having too much retail space can be a bad thing, especially as more shoppers go online for their purchases. Removing locations that haven't been doing well may not be a bad decision by CVS; it could help make the company stronger financially while focusing its efforts on the areas of its business that have more promise and growth potential. Rival Walgreens has also been shutting stores, with as many as 200 closures planned, or less than 3% of its total stores in the U.S. 

By focusing more on providing services rather than selling products, CVS is moving away from competing on a retail level and, thus, is less exposed to competition online, where consumers can buy many of the same products. Differentiation will be key for the health stock moving forward, and by closing stores and refining its strategy to one that can't be replicated online, it's putting itself in a great position for success for many years to come.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.