I think it may be an overly simplistic explanation, or maybe it is heresy posing as intellectual curiosity, but it might just be that the normative set of ritualized practices within the Jewish community was established by a guy with OCD.
Now, I'm not one to mock or denigrate people with Obsessive-Compulsive Disorder. In fact, I believe that every single person has some aspect of OCD. Some are just more obvious than others and some people are better able to self-regulate. I actually have this theory about most every condition. The human psyche is a delicate balance of defects, each one compensating for another. Only when one is out of balance does it then manifest. But enough about me.
So if you take a look at the kinds of traditional activities in Orthodox Judaism, you'll see that they are expressions of some person's perseverances a couple of thousand years ago. Now I'm not talking about the laws as listed in the 5 Books of Moses (nor am I suggesting that it was Moses who was the OCD one; he had anger issues, self-esteem problems and a complex family dynamic, but he wasn't OCD) but about the behaviors which have worked their way into our daily lives. Here are some examples steeped in the kinds of routines that an Orthodox person might have.
Wake up. Wash hands in a particular way a specific number of times.
Don't walk 4 steps without head covering.
Kiss the doorpost of every doorway.
Wash your hands in a different stylized way before eating certain foods.
All foods eaten must be preceded by a particular set of words.
Don't eat certain foods together or in a certain order.
If you touch your foot, wash your hands in a particular way.
Put your shoes on and tie them in a specific order.
Every spring hunt for any speck of certain foods and burn it.
If you light candles to start a holiday, you have to light them to end it.
4 cups of wine has to be balanced by 4 of everything else
if I wasn't OCD before I started doing all this stuff, I certainly am now. Gotta go wash my hands...