Long-term investors usually aim to buy stocks that can beat not only the S&P 500, but also the bear markets that tend to appear every few years. While investors should never "set it and forget it," they can often find stocks that have survived bear markets and emerged stronger when stocks recover.

Many of these stocks will deliver such returns by offering goods and services that stay in demand regardless of economic conditions. Two examples of this approach are Chipotle Mexican Grill (CMG 0.17%) and Broadcom (AVGO -1.84%).

Chipotle

Chipotle has successfully met a key customer demand that has eluded most of its competitors -- healthy fast food. It has built an international chain of more than 3,100 restaurants on the philosophy that real food is better for the planet and the customer. It does not serve food with artificial flavors, colors, or preservatives and bans the use of freezers and can openers.

As the company has planned to add between 235 and 250 new locations this year, its market continues to expand. It now believes the U.S. can support 7,000 domestic locations.

Additionally, it has yet to develop its potential internationally. It operates only 29 restaurants in Canada and 21 in Europe. Considering that both Starbucks and McDonald's have opened thousands of locations in both Europe and Canada, Chipotle could drive massive growth for years as it expands its focus more widely around the world.

But for now, the continued emphasis on the U.S. has served the company well. Chipotle's revenue of almost $6.5 billion in the first three quarters of 2022 surged 16% compared with the same period last year. This led to $675 million in earnings for the same timeframe, 30% more than the first three quarters of 2021. Keeping expense growth in check amid rising inflation helped to boost Chipotle's bottom line.

The stock has remained flat amid the bear market, helping to reduce the price-to-earnings (P/E) ratio to 54. While that is rich compared to peers, Chipotle has long traded at a premium. As long as its approach of fast, natural food spreads to more markets, this market-crushing stock could continue on its path for a long time to come.

Broadcom

As a company that provides custom semiconductors and enterprise software to businesses, Broadcom is not well-known to consumers. However, considering its competitive advantages and growth, investors should pay closer attention.

Specifically, prospective shareholders should take note of its approach to its customers. Broadcom locates engineers near its largest clients, allowing it to gain a deeper understanding of customer needs and create products to address those issues. It then spends heavily on research and development (R&D), devoting approximately $4.9 billion to R&D over the last four quarters alone.

A few Broadcom products even have direct exposure to the public. One of the more notable examples is the Wi-Fi hotspot built into Apple's iPhone. This allows for internet coverage when it is not otherwise available.

Broadcom is also diversifying. It focused exclusively on semiconductors until acquisitions placed it in the enterprise software market starting in 2018. Assuming it completes its proposed merger with VMWare, the enterprise software segment will make up nearly half of the company's revenue.

That revenue continues to grow. Broadcom reported more than $33 billion in fiscal 2022 (which ended Oct. 30), 21% higher than in fiscal 2021. That led to a 75% increase in net income during the period to about $11.5 billion, as the company reduced operating expenses by 5% during that time.

Investors should also take note of the fiscal 2023 dividend. At $18.40 per share, it returns 3.3%. It also increased 12% versus fiscal 2022 and has risen at least once every year since Broadcom (then known as Avago) introduced payouts in fiscal 2011. Additionally, the $16 billion in free cash flow in fiscal 2022 covered the $7 billion in dividend costs during that time, making the recent increase sustainable.

That may have also helped Broadcom stock hold its value well over the last year. And at a 24 P/E ratio, the valuation is coming off a multi-year low, likely signifying an opportune time to buy the semiconductor stock.