There are growing signs that Walmart (WMT 0.57%) is looking to make healthcare a larger part of its business, and that could be bad news for pharmacy retailers like CVS (CVS -0.65%) and Walgreens Boots Alliance (WBA -1.18%).

It's never a good thing to be going up against some of the largest and most resourceful companies in the world. But that's the reality for CVS and Walgreens, companies that are facing mounting competition from Amazon and now will also have to worry about Walmart. Here's why the big-box chain could soon be a thorn in the sides of both CVS and Walgreens. 

Walmart Health is already here, and it's getting bigger

Walmart's had a pharmacy for years, but lately it's been stepping up its game in the broader healthcare segment. In February, the company started offering healthcare services at a second store in the U.S. Customers near Dallas, Ga., and now Calhoun, Ga., can get a variety of services performed at Walmart, including dental, optometry, primary care, and many others.

Doctor using a tablet to review information with a patient.

Image Source: Getty Images.

And the company is expanding the services to more stores. On June 17, Walmart issued a press release announcing that its Loganville, Ga., store now offers healthcare services. Another Walmart Health location will also open in Springdale, Ark., on June 24. Walmart continues to target the Georgia market, however, noting that more stores in that state will have healthcare services available later this year.

Walmart says patients have been happy with the services thus far and the company believes it can offer Americans quality and affordable healthcare.

Walmart is also adding to its technical capabilities

Adding more locations is just one part of the equation. Walmart announced on June 15 that it was also acquiring assets from CareZone, which has developed a healthcare app that helps patients manage their prescriptions and medication. It's not an outright acquisition, but Walmart will acquire key CareZone assets, including intellectual property, patents, and its technology platform. Even the staff that's been involved in developing CareZone's app will join Walmart.

Walmart stated in its June 15 press release, "The technology and team members joining Walmart will augment our current Health & Wellness capabilities and support our focus on digital healthcare solutions. CareZone will remain a separate company unrelated to Walmart."

Although Walmart didn't disclose the terms of the deal, CNBC claims it cost the retail giant approximately $200 million.

CVS and Walgreens are staying competitive...for now

But CVS and Walgreens aren't just sitting idly by, waiting for Walmart and online retailers to take their customers. The pharmacy retailers have been making moves of their own to help keep sales up.

Since acquiring Aetna for $69 billion in 2018, CVS has been working to incorporate healthcare services at many of its locations. By the end of next year, the Rhode Island-based company estimates it will have 1,500 HealthHUB locations up and running.

The company also offers telehealth services through its MinuteClinic locations. And in its most recent quarterly results, CVS saw a 600% increase in the number of telehealth visits during the quarter compared with the same period a year ago.

Walgreens has taken similar steps in offering more healthcare services for its customers. In October, the company announced it would be opening 100 "Jenny Craig at Walgreens" locations, allowing consumers to interact with Jenny Craig consultants face-to-face. 

The Illinois-based company has also been focusing on telehealth. On April 9, Walgreens announced it was expanding its Find Care platform, which helps connect patients to providers. Users can now take a COVID-19 risk assessment using the platform. Walgreens also noted a 22% increase in app usage over a year ago.

Both CVS and Walgreens have evolved in recent years to expand their services. And both companies have done well during the early stages of the coronavirus pandemic, coming in ahead of analyst expectations in their most recent earnings reports.

Why CVS and Walgreens investors shouldn't be too optimistic 

Walmart Health is still in its early stages. For a company that earned almost $4 billion in its recent quarter, a $200 million investment in healthcare tech is a drop in the bucket. That's the good news for both CVS and Walgreens -- Walmart's still in the testing and fact-finding stages of this process. But that could quickly change as Walmart opens more locations and makes a bigger push into the segment.

Further complicating the risk is the coronavirus pandemic, muddying the results for CVS and Walgreens by making the stocks appear stronger than they are. While they're doing well amid this current health crisis, once the dust settles, things will look a lot different.

In 2019, Walgreens' sales were up just 4% from the previous year. In its second-quarter earnings for fiscal 2020, which were through Feb. 29, sales were also in line with revenue growth of 3.7%. But during the first three weeks of March, the company's same-store sales soared 26%.

CVS, meanwhile, saw no growth in its product sales in 2019; over two years, that metric was up just 2.9%. (This focus on product sales excludes the impact of premium revenue, which would skew the results due to the Aetna acquisition.) But during its first quarter of fiscal 2020, which included data through March 31, same-store sales (which would mainly include product sales) rose by 9%.

The key takeaway for investors

Neither CVS nor Walgreens had been growing at a particularly strong rate coming into 2020, and investors shouldn't lean too much on recent results, given the impact of the coronavirus pandemic on both companies, including higher traffic levels due to panic buying.

With Walmart potentially chipping away at some of those sales numbers in the years to come, it's only going to be more difficult for Walgreens and CVS to continue growing. Both companies were profitable in 2019, but staying in the black may also be a struggle if their top lines falter.

Walmart Health still has a minimal presence in the U.S., but that could change in a hurry. The company's seemingly endless resources make it a very undesirable opponent. With both Amazon and Walmart to battle for retail sales and prescriptions, Walgreens and CVS could soon be in over their heads. And that's why investors shouldn't regard either stock as a safe long-term investment.

They may be OK for now, but these aren't stocks you can buy and forget about, given the uncertainty that lies ahead.