Warren Buffett's Berkshire Hathaway (BRK.A) (BRK.B 0.71%) revealed that it started buying PC and printer manufacturer Hewlett-Packard (HPQ -1.39%) -- simply known as HP -- in early 2022. After another round of buying in early 2023, it has become a top Buffett stock, although recent filings show Berkshire trimmed its position a bit over the summer.

While that stake is only worth about 1% of Berkshire's total portfolio, the investment conglomerate owns over 12% of HP shares overall.

But I believe Buffett bought the wrong HP stock, at least up until this point. Hewlett Packard Enterprise (HPE 2.80%) was created in 2015 when the server and data center business was split from the PC and printer company. Since the start of 2022, HPE (as it's also known) has been far and away the better bet, generating a more than 12% total return versus a negative total return of over 20% for Buffett's HP pick. 

HPQ Total Return Level Chart

Data by YCharts.

Here's the likely reason Buffett made the choice, why it hasn't worked out so well, and what investors can learn.

Where Buffett went wrong, at least as of 2023

It's not hard to understand what drew Buffett and company to HP. In early 2022, HP was still in the midst of a growth cycle as consumers and businesses bought new PCs and other home office equipment en masse during the pandemic. HP knew it was no high-growth company, so it used this windfall to keep growing its dividend, as well as to repurchase billions of dollars of its stock. 

Buffett loves dividends and companies that return excess cash to shareholders by cannibalizing their stock. 

HPQ Dividends Paid (TTM) Chart

Data by YCharts. TTM = trailing 12 months.

The problem, though, is that the PC market is no longer a growth industry. PCs have been around for decades. For the most part, everyone who needs a computer has a computer. Sales are thus highly cyclical, enjoying short periods of growth during an upgrade cycle, but those can quickly give way to periods of decline as the cycle ends. 

HPQ Revenue (TTM) Chart

Data by YCharts.

It can be easy to be fooled by cyclical companies. What might appear to be a cheap stock could simply be a business going through a temporary period of elevated profitability.

When that period ends, shares may undergo a steep downturn as the market realizes that the period of elevated cash generation is ending. That's exactly what HP has endured the last few years when Berkshire started buying. 

The good news is that the company might again go through an upgrade cycle. After all, those PCs purchased during the pandemic will need replacing...eventually. But make no mistake, HP is no growth stock, and it wasn't a great value in early 2022, either. 

It's all about secular trends

HP Enterprise was also a cheap-looking stock in early 2022, and it actually paid a higher dividend yield than HP -- closer to 3% versus closer to 2% for HP. However, HP Enterprise wasn't doing an additional stock repurchase worth many billions.  

But the big difference between the two companies is that HP Enterprise's business model focuses on business computing, including data center servers for cloud computing and, more recently, generative AI. 

HP Enterprise also isn't a high-growth business, but data center servers are still in a secular growth trend -- an industry enjoying a long-term sustained period of expansion. With cloud computing still on the rise and new AI added to the mix, HP Enterprise has much better long-term prospects than HP.

Along the way, HP Enterprise also pays a dividend, with the possibility of raising it down the road, and has begun repurchasing a bit of its stock, too.

For the record, Wall Street analysts think HP revenue will be overall flat in the coming years, versus low-single-digit growth for HP Enterprise.

The lesson for investors is clear: Knowing a stock's valuation and shareholder return policy (dividends and buybacks) is only part of the story. If you want to find great dividend stocks to hold for the long term, investors also need to understand the industry the businesses participate in and if there's any growth potential to help fuel that quarterly payout.

At this point, it looks like Buffett picked the wrong HP stock, perhaps on a wrong assumption that PC demand would continue to grow for a long time. It isn't growing, but demand for business data center servers is.