What happened

Shares of AutoNation (NYSE:AN) soared more than 13% after the nation's largest automotive retailer announced second-quarter results that topped expectations, and reversed course by replacing its new CEO after just four months on the job.

So what

AutoNation after markets closed Monday reported second-quarter earnings of $1.12 per share on sales of $5.34 billion, topping Wall Street consensus expectations for $1.06 per share in earnings on sales of $5.29 billion. Same-store sales were flat relative to a year prior, and same-store gross profit had increased by 5%, led by strong demand for used vehicles and by strength from the company's financial services unit.

A car dealer hands a key to a customer.

Image source: Getty Images.

Same-store new vehicle gross profit per vehicle was $1,764 in the quarter, up 10% compared to the same quarter last year. The results were a welcome bit of good news for investors, who are facing fears of an automotive slowdown as the cycle turns.

AutoNation also named Cheryl Miller, the company's chief financial officer, as CEO, effective immediately. Carl Liebert, who was named CEO on March 11, will stay with the company for 30 days to assist with the transition.

The company's longtime CEO, Mike Jackson, who remains executive chairman of AutoNation, in an interview with the Wall Street Journal noted that Liebert was "entirely new to automotive retail" and said, "We came to the conclusion that it was not a good fit."

Miller has been with the company since 2009 and has been CFO since 2014. The company said she has led several key strategic initiatives, including building AutoNation's partnership with Google's Waymo unit.

Now what

It's somewhat surprising that the stock would react so positively to such an abrupt transition, but Jackson is a well-respected figure, and the market apparently likes the decisiveness of AutoNation's quickly realizing a mistake and working to rectify it. Stephens analyst Rick Nelson in a note said he was not shocked by the news, given that Liebert was an "unusual pick," and said Miller is well regarded.

With results remaining strong, investors appear willing to give Jackson and the board a mulligan on the CEO pick. It's now up to Miller to keep the momentum going.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.