More seriously: They check to see if you have a hernia - by
examining, & sometimes feeling, the scrotum. Nothing to do with
the prick itself.
I've also kena this before outside; the difference was the civilian
doc asked for a sneeze, rather than just a cough.
Appendum: A good tip would be to lay off the caffeine & also
don't over-hydrate beforehand. Empty your bladder prior & keep
an open mind. The whole process can be a bit of a cattle call,
quite monotonus & alienating as your detail gets shuttled
between stations. Used to get very cold as well (before the current
bathrobe thing) & of course there's the embarassment of moving
around in your underwear in a crowd.
There's also regular stories about how so-&-so - while
anxiously trying to adjust to the various conditions - ended up
getting a hard-on in time for the hernia check, & then try to
look nonchalant (amid suspicions of being perverted or something)
.... haha.