After less than three years on the job, Walt Disney (DIS -0.24%) CEO Bob Chapek is stepping down, and is being replaced by his predecessor, Bob Iger. The switch is effective immediately, according to the official announcement posted late Sunday evening. Beaten-down Disney shares are rallying on the news that Iger inked a two-year deal to lead Walt Disney out of its rut.

And, it's an understandable response. Although Chapek took the helm at a tricky time -- right before a pandemic that rattled the entire entertainment industry -- investors have become increasingly frustrated with his leadership. As of Friday, Disney shares were down more than 50% from their early 2021 high thanks to lackluster results. Its streaming subscriber growth is stalling, and earnings remain well below pre-COVID-19 levels. Putting a proven chief like Iger back in charge seems like a step in the right direction.

As the old adage goes, however, things aren't always as they seem.

Chapek's quick, unexpected exit speaks volumes

The news is eyebrow-raising for a variety of reasons. One of them involves the transition's abruptness. Most CEO exits are phase-outs, where the outgoing continues to work for weeks (if not months) to ensure a seamless handoff to the incumbent. While his 15 years as the previous chief executive means Iger should be able to easily step back into the role, Chapek's decision to suddenly step down could signal tension between him and the board of directors.

Perhaps the chief red flag waving here, though, is the fact that this very same board of directors lauded Chapek in June. In conjunction with unanimously extending his contract by three years, broad chairman Susan Arnold commented at the time "Bob [Chapek] is the right leader at the right time for The Walt Disney Company, and the Board has full confidence in him and his leadership team."

The language of yesterday's news release is starkly different, making mention of Iger's "mandate" in establishing the company's next strategic direction. Arnold now says "Bob Iger is uniquely situated to lead the Company through this pivotal period."

The nature of this pivotal period wasn't made clear, but it's not a stretch to suggest streaming services are a prominent feature of it.

In retrospect, Chapek's October 2020 decision to reorganize the media giant to prioritize streaming may have been a major misstep. While demand for then-nascent Disney+ and other streaming content was strong at the time, the easing impact of the pandemic coincides with waning demand for streaming services. Disney's direct-to-consumer operation's losses continue to grow, reaching a record-breaking $1.5 billion last quarter.  Though its theme parks are proving strong profit engines despite inflation, its film and television businesses aren't exactly performing at usual Disney-like levels either.

Something's got to change. The board is starting at the top.

Walt Disney was becoming a compelling buy again anyway

Yes, Disney stock is a buy now in the wake of this CEO switchout. It's not necessarily a buy, however, simply because Iger is in (again) and Chapek is out.

It's an underappreciated reality of the investing world, but sometimes, a chief executive's success or failure is largely the result of fortuitous or unlucky timing. It's arguable most anyone other than Chapek would have also seen the pandemic-prompted explosion of the streaming industry in 2020 and presumed the opportunity was a resilient one. In the same vein, it's also not likely anyone would be able to navigate the current inflationary, employment, and politically charged environment significantly better than Chapek has. Had Iger remained in charge rather than stepping down in 2020, he may well have produced comparable results.

Nevertheless, the looming environment is one that favors Walt Disney more than not, and Iger arguably understands Walt Disney better than anyone else could.

Remember, it was during Iger's 15-year run as chief executive that the company acquired Marvel, Goerge Lucas' Star Wars franchise, and launched Disney+ as well as Hulu just a few years prior. The current company is still largely the organization he built and then left behind, and he's taking charge again at a time when streaming-mania is cooling off; Disney won't have to fight a streaming price and streaming content war quite as intensely in the future as it has in the recent past.

At the same time, while the theatrical film business likely has been altered forever by COVID-19, it's hardly irredeemable. This year's Top Gun: Maverick is the 11th highest-grossing film of all time, according to numbers from Box Office Mojo, and last year's Spider-Man: No Way Home is number six despite being released in the midst of a pandemic. Consumers will still visit a movie theater for a splashy enough film.

Bottom line? Whether expectations of Chapek were fair or not is irrelevant to investors now -- Iger's opportunity for fresh growth from here is tremendous. There's also no denying Iger's perfectly suited for the job of getting Disney back on track at a point in time when a deeply discounted Disney stock is already ripe for a rebound.