Hmmm... i was wondering if this question was "been naked in front of your doctor (at some point, clothing wouldn't exactly help him/her with the examination!) or maybe the original intent of the question was "have you ever stripped in front of your doctor?"
I think often there's an inherant sexual overtone between two people when one person remains fully clothed and covered and the other person begins to take off their clothing in the other's presence- EVEN if it's 2 self-stated "100% hetereo males." One has natural curiosity of "what is the other guy concealing" and the other feels the blood rush that comes with making themselves vulnerable and naked to the other person. Add a female/male component, or a patient with a doc fetish, or one of many other numerous variables, and a little wood is bound to happen- at least perhaps a semi.
And, as Jerry Seinfeld would say about now, "Not that there's anything wrong with it."
And yea, If I take the question as it was originally asked "Have you ever undressed in front of the doctor?" There have been a couple times where instead of undressing between the nurse leaving and the doctor's arrival, I dropped trau with him standing there. I'd actually welcome that over having to wait another 10-15 minutes while I put on a flimsy cotton exam gown while he sees another patient.
The way I see it, my doctor is my employee to look after my naked body- and I am going to make sure that if/when necessary, he does his job.