Twice recently, I've had conversations with people about whether my OCD was "hard-wired" into me or was a result of my environment.
As I've mentioned before when talking about my immediate family, they do not have ANY contamination issues, and I grew up in a household where handwashing didn't really happen.
So I definitely didn't learn it there. Theoretically I could have rebelled at some point against my family's lack of concern about germs or dirt. But I don't think that's it either. I didn't ever (and still don't) look back at it in disgust. That's just the way it was, and we were all healthy and fine. And the older I am, the more I realize that most of the world is closer to my family growing up than they are to over-handwashing me.
Up until my early 20s, I had brief, very brief flashes of OCD behavior, including about a month where I was sure the house was going to burn down, and one truly weird incident when I become concerned about pregnancy despite not having had sex. But at age 25, it really felt like a switch turned on. Well, maybe a dimmer switch. Over the course of about 6 months, I just became more and more concerned about germs, and washing, and checking doors, until it completely overwhelmed my life.
I don't know how it happened, or why it happened then, but I truly feel that it was going to happen to me no matter how I'd been brought up. One half of my family has a full smorgasbord of mental illnesses, and this is just the one I was lucky enough to get.