In the middle of the hiring process I decided to review the company I had applied to in Glassdoor.
The reviews were very demotivating because they all mentioned multiple waves of layoffs in the last year.
By the time I read the company reviews in Glassdoor I had already had 3 interviews: phone screen, technical interview (leetcode) and system design interview. I performed excellently in all of them. The feedback from the interviewers and the recruiter was really good.
In my last interview with the hiring manager, everything went perfectly until it was my turn to ask questions. I could almost tell he was about to offer me the position. This was the question I asked him:
"When was the last wave of layoffs at <company>?"
He was surprised; I could tell by his facial reaction.
One week later, the recruiter sent me an email with an absurd reason for why they decided not to extend me an offer.
Do you think that the question I asked was the sole reason for my rejection?
Sorry to hear about the rejection. Since you got good feedback, I'm sure you did well but keep in mind that if interviewers are good, they'll make you feel like you're doing better than you actually are as I talk about here: https://www.jointaro.com/course/ace-your-tech-interview-and-get-a-job-as-a-software-engineer/temper-your-expectations/
If they did reject you due to this question (it's feasible), that's an overreaction IMHO. However, that question is definitely one of the worst you can possibly ask in a hiring manager round:
For the future, you can use Glassdoor/Reddit/Blind to find out this information on your own, so you don't need to ask anyone at the company. If you're interviewing with a company in the US, you can look at WARN act records: https://www.warntracker.com/
For better questions to ask in an interview, check this out: "What questions to ask a CTO of a startup?"
Rejection hurts, but it's all a part of the process to improve yourself as a candidate. Learn what you can from this experience and come back stronger than ever before. I believe in you, and best of luck with your future interviews!
It is possible. But at the same time there have been interviews where I was very confident afterwards but failed and vice versa. There are other factors that can play a role that are outside your control like how other candidates performed and how their prior knowledge compares to yours. In this market you can pass all the interviews but still not get the offer.