There are many reasons why some CEOs stay for a long time at one company and other leave or get replaced rather quickly. In light of this, let me give you a few reasons.
First, some CEOs stay at one company for a long time, because they are the best at what they do and they want to be there. Jack Welch is a perfect example. He is a legend. Steve Job is another example. When came back to Apple, he built it into a new company and it soared. In light of this, there was no way he was leaving. This can be said of Jamie Diamond as well.
Second, as you know, the times change. For this reason, markets and people change as well. For this reason, CEOs need to adapt. If they do not adapt (or better yet lead the way), then often times a company will bring in someone else to meet the new set of needs. Marissa Meyer from Yahoo is an example. For example, she just bought Tumblr.
Third, at times CEOs do not perform well and there is a vote of no confidence. When this happens, there is a turn over.
In short, there is one point that essentially matters. CEO need to produce and if they do not, they are let go.
Some companies do have a high rate of turnover. As you think about why, recognize that things change. There are times when there is a lot of upheaval, and times when CEOs stay in office longer. Some of this is due to trends—right now CEOs stay in office longer on average than they used to. Some of this is due to changing circumstances.
This brings us to some of the actual reasons. If there is a lot of upheaval in the larger economy, you see a lot of changeover among CEOs. For example, the 2008 financial crisis produced a modest increase in turnover: some businesses changed leaders to try to handle the challenges. On the other hand, if business is booming, people change positions because they think they can make a lot of money. If there's a lot of change in society/ the economy, you see more change in CEOs. As people tried to make sense of digital technologies, they looked for new leaders to help them. By contrast, if technology is stable, and markets are known, there's no real reason for people to change jobs often (or for companies to change leaders).