Being the head honcho at a major company, or even a high-profile startup, can be a glamorous gig. But if you think your job is secure, even if you're the co-founder of the company, you'd better think again.

We were reminded of that this week when Jack Ma's ecommerce giant Alibaba said it would replace Jonathan Lu as CEO with COO Daniel Zhang. Ma also called for a company-wide hiring freeze over fears that Alibaba scaled up too fast.

They say it's lonely at the top. But, really, it's high-pressure responsibility with the potential for a big payoff -- or extreme failure.

Here are nine examples of CEOs who have either been recently ousted or stepped down on their own accord.

Bonobos founder and CEO Andrew Dunn

Andy Dunn | Linkedin When: What happened:

Al Jazeera America CEO Ehab Al Shihabi

Aljazeera America

When: May 2015
What happened: Ehab Al Shihabi was replaced as CEO of the media company after it was sued for $15 million, over alleged sexism and anti-Semitism at the company. Al Shihabi was reportedly blamed by one departing executive for presiding over a " culture of fear."

The Qatar-based parent company Al Jazeera Media Network named Al Anstey as the new CEO, although Al Shihabi is said to be staying on as COO for now.

HTC CEO Peter Chou

Eleven Myanmar | Youtube

When: March 2015
What happened: A company in need of change often looks to the top when it makes its changes. That's what happened earlier this year at Taiwanese smartphone maker HTC. The company replaced Chou as CEO with co-founder Cher Wang, who had become increasingly involved in running various aspects of the business. Chou -- who is said to a have reputation as an abrasive manager -- would stay on to lead product development as head of the HTC Future Development Lab.

Read more: HTC Founder Takes on CEO Role Amid Company Turnaround

Mattel CEO Bryan Stockton

UCLAAnderson | Youtube When: What happened:

Nasty Gal founder and CEO Sophia Amoruso

Nasty Gal Blog

When: January 2015
What happened: A hot Los Angeles-based fashion and ecommerce company wound up having a rough year. Founded in 2006, Nasty Gal suffered three rounds of layoffs in 2014. This year, founder Sophia Amoruso decided her time running the show was over. She stepped down as CEO, passing the reins to Sheree Waterson, the company's president.

Amoruso -- who had been named to Entrepreneur's 2013 Women to Watch list -- said she'd stay on as the company's executive chairman and also head up the creative and brand marketing wings.

Read more: Nasty Gal Founder Sophia Amoruso Steps Down as CEO

American Apparel founder and CEO Dov Charney

dovcharney.com

When: December 2014
What happened: After a six-month suspension from the popular clothing company, Dov Charney was officially fired after allegations that he had misused corporate funds. In general, Charney's time as CEO was plagued by controversy. In 2009, the company came under fire for hiring illegal immigrants to work in its Los Angeles factory. Charney himself had been accused of sexually harassing female employees and of diving at and then choking a male employee before rubbing dirt in his face.

Charney didn't leave the company he founded without a fight, though. In March, he sued American Apparel for $40 million in damages for a breach of employment contract.

Read more: American Apparel Officially Fires Founder Dov Charney, Hires Its First Female CEO

McDonald's CEO Don Thompson

PamMiks via Wikimedia Commons | Enhanced by Entrepreneur

When: January 2015
What happened: Fast-food giant McDonald's announced that Don Thompson was retiring as chief executive after 25 years at the company. He was replaced by Steve Easterbrook, who was senior executive vice president and chief brand officer. The hope is that Easterbrook can revamp the menu and turn around declining sales.

Read more: Can McDonald's New CEO Bring Real Change for the Chain?

Reddit CEO Yishan Wong

Yishan Wong | Twitter

When: November 2014
What happened: Leading a company isn't always rocket science, but it also isn't a walk in the park, as they say. For Yishan Wong, running the news and networking site Reddit was far from a leisurely stroll. He resigned from the company, explaining in a note that the job was "incredibly stressful and draining." There also was a disagreement between Wong and the company's board over the location and price of a new office.

Wong was replaced as CEO by Ellen Pao, who later sued her former employer, Silicon Valley venture capital firm Kleiner Perkins Caufield & Byer, over alleged discrimination and bias. It was a high-profile case that she eventually lost.

Read more: Ex-Reddit CEO Says He Resigned Because 'It Wasn't Supposed to Be This Hard.' Hmmm.

Oracle co-founder and CEO Larry Ellison

Oracle PR | Flickr

When: September 2014
What happened: The Oracle co-founder stepped down as CEO. In his place, Ellison named a pair of co-CEOs: Mark Hurd and Safra Catz, who served as co-presidents.

In the announcement, Ellison said he would remain with the company as executive chairman of the board. He will also serve as the company's chief technology officer, with a focus on product engineering, technology development and strategy.

Read more: Billionaire Entrepreneur Larry Ellison Steps Down as CEO of Oracle