An awful lot of research is done on each person chosen.
Whether that person gets "chosen" for a televised episode largely depends on whether there is a back story that the producers think would make an interesting episode.
An ancestor of mine appeared in one episode; John Constable RA.
Unfortunately, this means I am also related to Barbara Windsor!

Finally, I have been involved in research, potentially for the program.
Unfortunately, I was working from very common names, with no discernible links to the later generation, and a choice of 10 or 12 potential people who could have been the father!