Millions of investors rely on the Dow Jones Industrial Average (INDEX: ^DJI) as their primary measure of how the stock market is doing. But over the years, even the Dow has made some dumb moves in making changes to its list of 30 stocks.

Today, I want to highlight three stocks that got booted out of the Dow at one point. In each case, doing so ended up really hurting investors who follow the market average. But first, let's take a quick look at the history of the Dow to understand better just how stable it's been throughout its existence.

Changes to the Dow
The Dow hasn't changed much over time, especially compared with frequent changes you see in the S&P and Russell indexes. By being picky in selecting its 30 stocks, it has managed to keep its changes to a minimum, having substituted new companies for old on only 48 different occasions since 1896.

Still, among all those changes, the folks who choose the Dow 30 have made some bad decisions. I've picked three particularly egregious examples of stocks whose departure from the Dow represented a missed opportunity for the average.

Coca-Cola (NYSE: KO), out of the Dow from 1935 to 1987
Coca-Cola is well known as a current Dow component. But what you may not know about the stock is that it got kicked out of the average in 1935 and wasn't let back in until 1987.

In the interim, of course, Coke came a long way toward becoming the beverage giant it is today. The Coke name became a registered trademark in 1945, and it became the first product to hit the cover of Time magazine in 1950. The company grew quickly in every way, through expansion into export markets, broadening its lineup of beverages to include diet drinks and juice, and introducing numerous ad campaigns such as its "Real Thing" and "Have a Coke and a Smile" slogans.

The Dow has benefited from 25 years of Coke's success, with shares having jumped 20-fold since 1987. But by missing out on Coke's long-term growth, the Dow made a mistake letting it go.

IBM (NYSE: IBM), out of the Dow from 1939 to 1979
As with Coke, the Dow made a similar error with IBM. Bad business conditions made for tough times at the business-machine maker in the Great Depression, but the company's true growth came in the expansion that followed World War II.

The company went on to pioneer the entire technology industry, with its hand in the early development stages of computers, disk drives, and computer programming. The company grew so powerful that in 1969, the Department of Justice filed suit against IBM, alleging that it had monopoly power over the computer industry. IBM eventually responded by unbundling hardware from software and services -- unwittingly setting the stage for its eventual strategic shift more than 30 years later.

By 1979, IBM was in the final stages of preparing the world for the PC. Yet in another case of bad timing, the Dow added IBM just before it made the mistake of going against past practice by outsourcing its operating system to Microsoft and its microprocessor to Intel, opening the door to their eventual dominance of those two fields. IBM recovered by turning to IT consulting as a higher-margin business, but Dow investors missed out on a 22,000% return over the 40 years that IBM was out of the Dow.

Altria (NYSE: MO), out of the Dow since 2008
Of these three stocks, only Altria is still out of the Dow. But in the 23 years that the tobacco company formerly known as Philip Morris had a spot among the Dow 30, it posted amazing returns, with its shares jumping more than 8,000%.

Over the years, Altria faced plenty of challenges that could have gotten it ejected from the Dow. Tobacco litigation raised fears of bankruptcy on more than one occasion and contributed in the decision to spin off Kraft Foods, with the idea of sheltering the food division's assets from potential judgment creditors. Yet Altria has survived all those fears and thrived, paying a huge dividend along the way.

Instead, what led to Altria's exit from the Dow was its decision to split up its successful divisions. When the company spun off Philip Morris International (NYSE: PM) to let it focus on international operations, the remaining Altria was just a shell of its former self. Yet in the past four years, the stock has jumped nearly 60%, compared with a tiny 3% total return for the S&P 500. Eventually, if it keeps up its pace, Altria just might get an invitation to rejoin the Dow, just as IBM and Coke did.

Learn from your mistakes
Hindsight is always 20-20, but the absence of these three stocks has cost Dow-tracking investors huge gains throughout their histories. More than anything, that demonstrates the importance of making some individual stock picks rather than putting all your money into index-tracking investments. By bucking the Dow's trend and holding on to these stocks, you'd be a lot richer.

You'll find some pretty great stocks outside the Dow as well. Let me invite you to read The Motley Fool's latest special report, in which you'll find three great opportunities for huge long-term gains. The report is absolutely free, but it won't be around forever, so read it today.