(I applied to present on Dragons Den for a robotics project I worked on as an extracurricular at uni - I pulled out when my research supervisor advised that we'd have no chance of having a demo in time)
I understand the Dragons are briefed on the pitches beforehand, and I wouldn't be surprised if they sent their own legal team on the projects - who would dutifully tell them what questions they should ask to the 'contestants' on the show.
...not to say they couldn't possibly have thought of a question like that on-the-spot, on the contrary; but given how fake reality TV is in general (and the BBC is no exception) I'm not betting that what we see on screen is exactly, and only, what happens.