In a surprising move Thursday, Wells Fargo (WFC -0.03%) CEO Tim Sloan announced his immediate retirement. Sloan, who was originally brought into the CEO role to help the bank get beyond its numerous scandals, will be replaced by a yet-to-be-named external candidate.

Here's a rundown of the events that led up to Sloan's departure, and what investors should know going forward.

Exterior of Wells Fargo banking branch.

Image source: Wells Fargo.

Sloan's retirement: How it will work

Tim Sloan, 58, is stepping down as Wells Fargo's CEO right away. In fact, by the time you're reading this, he's no longer in the role. He will get some benefits for the next two years worth about $400,000, according to regulatory filings, as long as he stays available to the company for consulting services and helps the firm with customers and employees during that time. He’s still eligible for his pension and deferred compensation.

For the time being, Wells Fargo will be led by interim CEO Allen Parker, who serves as the bank's general counsel. As far as a permanent CEO is concerned, Wells Fargo announced that it is conducting a search for a new CEO, but that the bank will be considering only external candidates.

Sloan's departure comes just weeks after it was revealed that he'd received a 5% raise in 2018, despite the fact that a Federal Reserve penalty that prevents the bank from growing its asset size remains in place.

Check out the latest earnings call transcript for Wells Fargo.

Wells Fargo has changed under Sloan's leadership

Sloan was appointed as CEO in October 2016 after then-CEO John Stumpf resigned in the wake of the exposure of the fake-accounts scandal, and his main objective was to clean up the mess.

To be fair, there's a solid case to be made that he's done a good job. The bank's sales culture, which was the underlying cause of its major scandals, has been completely overhauled. Product sales goals don't exist anymore for retail bankers in Wells Fargo's branches, and new incentives that encourage customer-focused behavior have been put in place. And the bank has done a good job of providing restitution to customers who were affected by its lapses.

The bank couldn't really move on with Sloan at the helm

Sloan has indeed been focused on making changes with Wells Fargo's culture and working to restore its public image. However, in the eyes of many investors, regulators, and politicians, no matter what Sloan did with Wells Fargo, it wouldn't be enough. And there's one big reason for that.

When the fake-accounts scandal, auto insurance scandal, mortgage rate-lock scandal, and numerous other issues were going on, Sloan was a part of Wells Fargo's leadership. Sloan had been with the bank since 1987 and held the roles of COO and president starting in 2015. In other words, Sloan was put in charge of cleaning up a mess he'd had a hand in creating.

This could be great news for investors

The biggest complaint among regulators and politicians while Wells Fargo's drama has carried on has been that Sloan should have never been put in the CEO role in the first place, given his role in the bank while the unethical acts were still going on. In fact, outspoken Wells Fargo critic Sen. Elizabeth Warren, D-Massachusetts, even sent a letter to the Federal Reserve calling for last year's unprecedented penalty to remain on the bank until Sloan is replaced.

It's tough to overstate the importance to investors of the Fed lifting its penalty. Until that happens, Wells Fargo is essentially not allowed to grow during what's arguably the best growth environment for banks in decades. As long as the bank follows through with its plan to bring in a well-qualified, external CEO candidate, investors may finally get some good news in this area.

Wells Fargo stock was trading down about 2% midmorning on Friday.