What happened 

Shares of Walgreens Boots Alliance (NASDAQ:WBA) fell 29.4% in 2020, according to data provided by S&P Global Market Intelligence, as the pandemic and new competition hit the stock. 

Operationally, Walgreens is struggling with higher costs at a time when it's actually become a critical supplier. As it turns out, being on the front lines of a pandemic isn't necessarily good for the bottom line. 

Illustration of a pharmacy counter with four socially distanced customers waiting in line.

Image source: Getty Images.

So what 

It may seem counterintuitive, but the pandemic has actually had a negative impact on Walgreens' business. The company's margins were down dramatically last year, and you can see below that net income dropped as a result. There's pressure on reimbursements, and mix was negative due to COVID-19, so there simply wasn't the same margin Walgreens usually expects.

WBA Revenue (Quarterly) Chart

WBA Revenue (Quarterly) data by YCharts

To make matters worse, Amazon's (NASDAQ:AMZN) pharmacy launched late in the year and could take market share from traditional pharmacies. The pressure from online sales may not seem like a big deal now, but with locations across the country, real estate costs are high, and any loss in sales has a magnified effect on the bottom line. 

Now what 

I don't think a company like Walgreens is going anywhere anytime soon, given the critical services it supplies. But its bottom line may be under significant pressure as more people get their medical appointments and prescriptions online. This isn't a pharmacy stock I'm bullish on in 2021, despite the fact that shares are cheaper than they were a year ago. 

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.