According to a regular in Gygax and Arneson's early Blackmoor and Greyhawk games, the cleric was largely draw from the priests in 70s vampire movies, with the prohibition against edged weapons inspired by legends and fantasy fiction:
Ahem. I was there.
In CHAINMAIL there were wizards that functioned as artillery.
Then there was Dave Arneson's first miniatures/roleplaying campaign.
Some players were 'good guys' and some players were 'bad guys' and
Dave was the referee.
One of the 'bad guys' wanted to play a Vampire. He was extremely smart
and capable, and as he got more and more experience he got tougher and
tougher.
This was the early 70s, so the model for 'vampire' was Christopher Lee
in Hammer films. No deep folklore [stuff].
Well, after a time, nobody could touch Sir Fang. Yes, that was his
name.
To fix the threatened end of the game they came up with a character
that was, at first, a 'vampire hunter'. Peter Cushing in the same
films.
As the rough specs were drawn up, comments about the need for healing
and for curing disease came up.
Ta da, the "priest" was born. Changed later to 'cleric'.
The bit about edged weapons was from Gary's reading the old stories
about Archbishop Turpin [ed: later clarified to be Bishop Odo], who wielded a mace because he didn't want to
shed blood ("who lives by the sword dies by the sword").
In other words, it came about the same way that 90% of the D&D rules
came about :
WE MADE UP SOME [STUFF] THAT WE THOUGHT WOULD BE FUN.
As he says, clerics were partly inspired by stories and misconceptions about historical warrior-priests, such as Turpin from the Song of Roland and Odo, a prominent figure in the Bayeux Tapestry. The idea of fighting clerics vowing to avoid spilling blood with their weapons is not at all historically accurate, but it's a popular image in some legends and Victorian pseudo-history, and featured in fantasy fiction of the 60s and 70s as well (e.g., according to Wikipedia, The Once and Future King).
As far as I can tell, there was no original rationale other than flavor. Maces are generally a bit weaker than swords in most editions of D&D, but OD&D used straight d6 for weapon damage rolls; I think at that stage the game had other "balancing" mechanisms so weapon damage wasn't a big one. I can't say whether Gygax actually believed the image of the cleric fighting with only blunt weapons was historical — remember, D&D's chief goal was always to emulate the creators' favorite fantasy fiction, not real history — but he clearly liked it enough to make it a part of the game.