My dad, who was a historian and business professor, told me once that you could trace the start of the decline of a company when they completed their showcase palace headquarters. The problem is they became focused on the edifice rather than their business.
I wonder how much of that is some sort of reversion to the mean though. I.e. you often don't build a showcase palace headquarters until you've clearly been a great success. Not always of course. Executive ego can't be discounted in some cases.
However, to the degree a showcase gets built when a company is riding high and growing, it's not unusual that looking out 5 or 10 years, that company won't be doing so well.