Some interview questions are unique. "If you could have any superpower, what would it be?"
Some interview questions are routine. "Why did you leave your last job?"
Despite their being so different in form, both questions have a common purpose. They are meant to help the interviewer understand your motivations and desires and to help them judge whether you will fit in.
Questions like the first are hard to prepare for – they're so non-standard, they're unexpected, and it's hard to know how someone will react to anything you say – but there's no excuse for not being prepared for the second. Your answer has to be fact-based (because a potential employer can verify your answer), it needs to feel truthful to you (so you can state it with confidence), and it needs to reassure the interviewer that your rationale for leaving was appropriate.
No matter what your reason for leaving was, there are ways to shape your answer to this question that make it positive. Use the following examples as a guideline for answering this question:
• I was laid off. The company had layoffs, and unfortunately I was one of the people who were affected.
• I was bored. I went into the job hoping to accomplish A,B,C (or learn X,Y,Z), and I was able to do that. Now I'm looking for a role where I can achieve D,E,F (or work with technology Q,R,S).
• There was too much production support. The company had a lot of other issues that kept us from focusing on building the product.
• Politics got in the way. I'm really excited by the opportunity to develop and ship a product. Because of management changes at my former employer, we weren't able to focus on delivery.
• It was disappointing in every way imaginable and I escaped as fast as I could. I knew very quickly that the situation wasn't the right fit for me. I could have stayed but I wouldn't have been doing my best, which wasn't fair to either me or my employer. By moving on, I can find a position where I can contribute fully, and they can find an employee who will contribute what they need.