It's been a tough past 12 months for most companies. Not only is the COVID-19 pandemic still with us, but inflation is now soaring, biting into profits. Russia's war against Ukraine further threatens the stability of an already wobbly global economy. Given all of this, it's no wonder most stocks have been struggling so much this year.

Not all stocks are having trouble, though. A handful of dividend payers have not only managed to shrug off problems plaguing other names, but they may even be thriving because of the environment. Here's a closer look at three of the best stocks of this grouping; it should come as no surprise that they're all in the business of giving consumers what they want and need.

Bunge Limited

Dividend yield: 2.2%

Bunge Limited (BG -3.49%) may not be a household name. There's a good chance, however, that you or someone in your household is a regular consumer of at least one of its products. The company farms a variety of food crops, ranging from soybeans to sugarcane to sunflower seeds, supporting the manufacture of canola, cooking oils, milled wheat, and more.

Food prices, of course, are through the roof. Don't necessarily blame food companies like Bunge, though. They've been rising since the pandemic first disrupted supply chains. Then, last year's inflation surge, prompted by a tsunami of cheap stimulus dollars, followed by Russia's invasion of Ukraine, one of the world's biggest wheat producers, only made matters worse. Also bear in mind that in step with higher food prices, the food industry's own costs, like freight and labor, are soaring.

Nevertheless, Bunge's new-found pricing power arguably did it at least as much good as higher costs harmed it. Last year's 43% sales uptick  was paired with a 20% rise in gross profit , pumping up its adjusted per-share income from $8.30 in 2020 to $12.93 in 2021.

This year's projected earnings should be comparable with analysts expecting 15.2% revenue to produce a bottom line of $12.33 per share, although things are likely to level off from there moving into 2023. Even so, this dividend-paying food stock is not only serving up a market-beating performance, but it's also on pace to dish out a record-breaking $2.40 worth of per-share dividends that are clearly affordable.

British American Tobacco

Dividend yield: 6.9%

So-called "vice stocks" are generally reliable picks even if they're rarely high-growth holdings. That's because vices such as smoking, alcohol, and gambling are, by definition, always in demand.

Enter British American Tobacco (BTI -0.24%), which is up more than 20% for the past six months while most other stocks are in the hole for that time frame. Why? Because, knowing that smokers tend to keep smoking even in an ugly economic environment, investors have sought out safe havens such as this one.

The global smoking-cessation movement isn't working as well as one might expect. Based on the most recent data available, the World Health Organization believes the worldwide number of regular smokers will only slide from 2015's count of 1.32 billion to 1.27 billion by 2025. In the meantime, thanks to price increases, Imarc Group estimates that the global tobacco market will grow at an annualized pace of 1.5% per year through 2027.

That's good news for British American Tobacco, which makes and markets cigarettes under the Kent, Lucky Strike, Pall Mall, and other brands in nearly 200 countries.

While being U.K.-based means it's not required to offer full quarterly updates as U.S.-based companies are, British American's recently published half-year report confirms that the company's top line is on pace to improve between 2% and 4% this fiscal year, following last year's flat revenue comparison. This year's per-share earnings are also expected to grow by mid-single digits, extending last year's 6% increase. It's not much, but it's dependable.

That being said, British American Tobacco is still adapting to a changing marketplace that's increasingly combative toward smoking. The company is also the name behind vaping technology outfit Vuze, and the THP brand of tobacco heating products that don't create smoke. Revenue from these noncombustible products grew on the order of 30% last year  and should continue to grow at a similar pace this year.

Packaging Corporation of America

Dividend yield: 3.1%

Finally, add Packaging Corporation of America (PKG 1.78%) to your list of stocks that have defied the odds by performing well of late and are likely keep performing well for the foreseeable future.

It's not a terribly tough set of dots to connect here. Consumers buy stuff in any economic environment. The only thing that changes is what they buy. People tend to spend more on pre-packaged groceries when times are tough, for instance, and are likely to buy more discretionary goods, such as electronics and home goods, when the economy is humming. Packaging Corporation of America offers solutions for both markets, and dozens more. Signboards, in-store displays, printed containers, and bulk-selling cartons are all in its wheelhouse.

This is a big reason this stock is up 15% year to date, although it's hardly an undeserved gain. Last year's top line was 16% stronger than 2020's, and that growth continued on into the first quarter of this year, with an 18% improvement. Profits are up, too, growing from 2020's $4.84 per share to $8.83 in 2021, en route to an expected $11.56 per share this year, according to analyst estimates.

And the company is sharing this growth in a big way with its shareholders. The newly raised quarterly dividend is a whopping 25% higher than the payouts it was making as of last year. Look for more of the same, too, since the ongoing growth of e-commerce plays right into the hand this company is holding.