Deepak Ahuja, Tesla CFO (left) and Elon Musk, Tesla founder and CEO (right), at the Nasdaq opening bell ceremony for the Tesla initial public offering on Tuesday, June 29, 2010.

Tesla announced on Monday that it is laying off 9 percent of its salaried workers, a move that was not a complete surprise, as it had previously announced a reorganization was coming. And if there is one Tesla employee other than Elon Musk who has been through this before and knows when layoffs need to be made, it is Tesla CFO Deepak Ahuja.

A Musk confidant who rejoined Tesla last year — after having retired — Ahuja first joined Tesla as CFO at the worst possible time: July 2008. Speaking years ago to alumni of the Indian Institute of Technology where Ahuja himself was once an undergrad, the Tesla CFO talked about the time when he thought that he might be laid off himself.

Within two months of Ahuja joining Tesla in the summer of 2008, the global markets collapsed.

"Those were the dark, dark days — the nuclear winter so to say," Ahuja recalled.

At the time, Tesla was closing on a $100 million Series E round, but it fell apart.

"It meant we had to completely redesign our business plan. We let go 30 percent of our workers," Ahuja recalled.

Obviously the company was of a much smaller size in 2008 than its current employee-count over 40,000, though the situation amounted to an existential crisis for Tesla.

The Tesla CFO was somewhat surprised that he survived that round of cuts.

"I thought maybe I'll be let go; it made sense. Why have a high-paid CFO when you don't need it?"

That 2008 situation was arguably worse than Tesla's current financial situation, even though its current cash burn and production challenges have attracted a great deal of attention. The financial crash was an economic scenario in which venture capital wasn't the only money that vanished: the consumer discretionary spending on which a car company like Tesla lives or dies completely dried up.

Ahuja said there was a period in his earliest days at Tesla when it felt like payroll wouldn't be met the next week. "There was no funding, and Mr. Musk was funding the company from his own pocket."

A bad situation was compounded by the fact that he had moved his family across the country to take a risk on Tesla, leaving a safe job at Ford.

"I actually did not tell my family. That would have made them pretty upset. Musk was funding from his own pocket, and I had to keep that even away from my own wife, quite frankly. But I was prepared to move in a week if Tesla blew up, and it could have happened."

Ahuja said in those days he only gave Tesla a 50 percent chance of making it, but the worst of times and the cuts Tesla had to make after the financial crash did teach him a lesson about success:

"There are many many existential threats that come along the way and sometimes feel they are coming on a daily basis or sometimes weekly or quarterly, but they are always there, and the ability to survive through that is what's really a part of being a successful entrepreneur."

In announcing the layoffs to Tesla staff, Musk noted:

"Given that Tesla has never made an annual profit in the almost 15 years since we have existed, profit is obviously not what motivates us," Musk wrote in the company email. "What drives us is our mission to accelerate the world's transition to sustainable, clean energy, but we will never achieve that mission unless we eventually demonstrate that we can be sustainably profitable. That is a valid and fair criticism of Tesla's history to date."

The company has suffered large losses each of the last three years. Tesla lost nearly $2 billion in 2017, lost $675 million in 2016 and lost $889 million in 2015. But after many years of negative financial results, Musk in April predicted the company will be profitable in the second half of this year.