When asked in an interview, why did you choose to go into testing rather than development?
What Is Actually Being Asked?
The question implies that the interview is for a testing position. And the interviewer’s question really has two reasons behind it:
First, to determine whether the candidate made the choice proactively or was pushed into it.
Proactive: they have their own ideas and set their sights on a testing role from the start.
Passive: they would actually rather do development, but their programming skills are insufficient, and algorithms, design patterns, and the like are a mess.
Second, to see how well the candidate understands the core requirements of these two roles.
How Should You Respond?
Once you understand the purpose behind the question, the strategy for responding becomes clear:
First of all, of course, you should show the interviewer that you considered this role proactively. And the reason you considered it is precisely your own understanding of testing work.
For example, in one of my previous answers:
What Is the Purpose of Software Testing?
The testing role actually calls for many qualities different from development work, such as being good at questioning, paying attention to detail, and enjoying digging down to the root of things.
In Jame Bach’s discussion of the difference between testing and checking, he in fact also points out many of the special abilities that testing work requires.

Beyond that, you can also demonstrate some of the accumulation you have in testing-related areas — for instance, a solid grasp of testing tools and test automation; and if you have relevant, presentable project experience, that is all the more convincing. The implicit message here is that you did not choose against development because you lack programming ability or cannot do development, but simply because your interests lie more on the testing side.
As for the differences between these two roles, testing and development, you can also elaborate from angles such as these:
Development weeds through the old to bring forth the new, while testing holds that nothing can be built without first being broken.
Development work pursues certainty, whereas testing is grounded in uncertainty.
Development emphasizes creation, while testing excels at digging into unexpected side branches.
And so on…

A Note
All the above speaks of response strategies, but it is best if you genuinely lean toward this job because of the nature of testing work itself, rather than settling for it as a second choice.
