The dog will be exposed to bed bugs in their different stages in order for the animal to be able to learn the varying scents of these insects. It is also important to teach the dog scent discrimination for it to be able to distinguish between live and dead ones.
Bed bugs do not live on their hosts. Unlike fleas, bed bugs don't move onto you, your children, or bed bug dogs. It is of course statistically possible that a dog could pick up a stray bug, but it's highly unlikely. Bed bugs don't tend to go after moving targets. The reason they're so hard to detect is that they're good at hiding.
Your dog could end up with some skin issues if bed bugs become a problem. They can get into the dog bed, the floor, animals, stuffed animals, curtains and just about everything in between. If you have bed bugs, you have to do a major detox to your home.
A well-trained bed bug detection dog should be able to identify very small numbers of live bed bugs, sometimes as few as one. Additionally, the dogs should be able to discriminate live bugs and viable eggs from evidence left over from an old infestation (fecal spotting, caste skins, empty egg shells, carcasses).
There are no apparent reasons why dogs do eat bugs. Probably, it is because of the dog's natural curiosity for things. The fact that some bugs keep on flying around the place catches the attention of dogs to the extent of wanting to capture them and play with them.