For me, it was a gradual discovery over the years. Growing up, I always wanted to be a Doctor. So I have always been very interested in anything medical related. I remember playing doctor as a kid, but never any of the examining each other's private parts stories that many others had. Starting in about 3rd grade, a sibling had to have a couple surgeries, and I wanted to know everything about it. I also loved watching surgeries on TV.
I would often play doctor/patient by myself. Oddly, despite wanting to be a doctor, I would always pretend to be the patient. I would bandage and immobilize different limbs. Have makeshift IVs taped to my arm. Force myself to remain still on the bed while "recovering from surgery."
I think it started to become more sexual in nature after researching colonics. An episode of Jackass had one of the guys receiving a colonic. I saw this as a medical procedure that you could elect to have, so started researching them. During that, I found out about enemas, and there used to be a website for enema stories. My favorite had a femdom theme where the sub was given an enema, and had to hold it until he gave her an orgasm through oral.
Over time I have developed as a mostly submissive leaning switch. I enjoy a lot of BDSM practices but I love being on the receiving end of Medical fetish activities. The more restrictive, exposing, and invasive the procedure (non harming) the more I fantasize about it.