Apple traded in the $7-$12 range during 2002-2004. The iPod was launched at the end of 2001 and had not caught on yet. People were afraid that the company is on the track to obsoletion. Fast forward to Sep 2012 and the investors were falling over one another to own the company. It seemed that the company could do no wrong. The business was fantastic, the margins were high and the cash flow was copious.
Investors were proved wrong in both cases.
This is not specific to apple. Similar situations are ubiquitous occurrences in the stock market.
When the price of a security is constantly climbing over a long term then one can safely assume that there is some sort of luck involved. Things are going swimmingly well for this reason. It is not to say that the underlying business is not improving or that the management is not able. Luck has tried the patience of many great businesses and managements.
Luck reduces your margin of safety. By not buying a company when things are going exceedingly well you will increase your margin of safety.