I've written about this before... but I guess I didn't consider all of the consequences.
So, the idea is this: you can get spell in multiple ways - study forgotten tomes, worship a deity, bargain with a demon, have magic blood running in your veins... But once you learn a spell, it is yours.
A paladin that falls from grace still keeps his powers - making fallen paladins the stuff of legend! What is worse, they can pledge loyalty to an evil, rival deity becoming more powerful in the process. There is always a high demand for turncloak healers in the Evil Lord's army! That is why lawful deities are so careful when choosing their clerics and paladins!
Chaotic deities, on the other hand, will be more flexible - they might exchange spells for goods and services.
Of course, forgotten tomes of forbidden lore are also useful when studying magic. Their authors must guard them carefully, or such secrets might be turned against them.
On the other hand, casting spells you haven't memorized should always be dangerous. Magicians can also create "trap grimoires" to fool their rivals.
The idea that a deity can strip you of yours powers is not only a shackle to the character, but also wastes interesting possibilities, such as the renegade paladin that goes rogue (with all his powers intact) and must be hunted by other followers. The fact that the deity cannot take you powers away directly opens a lot of indirect possibilities like this one.
It also makes sense in other ways.
The idea that your deity is right there with you when you cast a haling spell gives deites an omnipresence/omniscience that is NOT fitting to the vast D&D pantheon. If the deity can strip you of your powers, why not DOUBLE your powers when you're in dire need? Also, why even CHOOSE the spell you want to cast and not let the deity intervene in a way that is more beneficial to its goals? The deity knows a lot more than you, anyway...
In short, I think of most D&D deities as non-intervening. At least, direct intervention should be rare. Deities act through angels, avatars, followers, etc. In addition, the deities are not omnipotent. The spells they can teach are limited resources.
(BTW, I really like the RC idea that deities need more followers to be more powerful, and I love the idea that a deity without followers maintains its powers for a while...)
But I hadn't really thought this through. In Dark Fantasy Basic, a magic-user that fumbled a spell roll had the spell wiped from memory... but a cleric that fumbled a spell roll could anger his os her deity.
But, come to think of it... why? If the deity had given the cleric magic powers to heal the wounded, why would the cleric be damned just because of bad luck?
What if you say, instead, that the deity will just TEACH you a spell from time to time - through prayer and meditation, you can get to revelation, but deities are careful when imparting such gifts... A deity can give a spell... but it can also give a sword, a prophecy, a vision of guidance, heal your wounds, etc.
Cleric's spells are not "miracles" anymore, and miracles become a lot more varied. In addition, divine gifts are not only for clerics - maybe a god of war will give your fighter the strength to fight an important enemy, etc. Religion becomes a lot more relevant for ALL characters.
As you can see, this solves LOTS of problems.
YOU choose the spell level, BTW. Pushing your luck is risky.
Fumble your spell-casting roll and it is wiped from your memory. You have to learn it again. If you have a grimoire, all the better. Otherwise, it will take a while. Your deity might help you... but ONLY if you are in good standing with it.
So, even if you LIKE the idea of a deity giving you a quest after you fumbled a spell, this has the same effect... but the motives are different. The deity isn't necessarily punishing you. It simply has to be careful while sharing limited resources with someone who is so eager to use them in imprudent ways.
In addition, these quests are not only proofs of faith - if they were, any dumb thing such as removing one of your eyes would do.
The quests are are means for the deity to further its own goals in the world. This makes them much more interesting - maybe you have to find a lost relic, or convert more people to your faith... or even hunt down a rogue paladin.