That's not true in multiple D&D worlds...
It's worth noting, before anything else, that all of these answers about whether or not you need a deity to grant spells, or can gain them from something else, are fluid, and have changed over time during the course of D&D. Sometimes that's true even for various worlds.
The 2E
Complete Priest's Handbook, for example, flat-out stated that - as an option - clerics could gain their spells from a faith (god), a force, or a philosophy. This wasn't meant to be set in stone, but was an example of how DMs could approach the question.
1.) Mystara has no Gods; they have immortals who (while powerful beings) don't grant spells directly to priests. Clerics draw power from belief (usually in a universal force like Law or Good) and may be a member of a church which worships many deities. A cleric could belong to a church but not worship an immortal (or immortals) or even do neither and still receives his powers.
It's worth noting that, after Basic D&D was no longer supported, Mystara was brought over into 2E, and its "immortals" became deities - many of these (the good and neutral ones) are expressly listed in the back of
Warriors of Heaven.
2.) Athas has no Gods; priests worship aspects of nature (rain, sun, wind, etc) which grants them power.
Druids can also worship the "spirit of the land" (e.g. nature) to gain spells. Templars, prior to 4E, were divine spellcasters who drew power from the sorcerer-kings (the sorcerer-kings themselves were granting this power via a conduit to the elemental planes, gained from a "living vortex" in early products, and retconned to be the Dark Lens (a major artifact) later on).
3.) Eberron, while having deities, also allows clerics of "the Dragon Above", a divine force that is non-sentient (or at least non-communicative) and grants clerics power.
The Silver Flame could be said to be an example of a "force" as mentioned above.
4.) Krynn, at one point, had no deities and clerics (well, mystics) drew on internal power of belief to power divine magic.
It's worth noting that as originally presented, mysticism (in the SAGA RPG) could only affect living things, and was very different from clerical magic of previous ages. This was retconned when the 3.5 Dragonlance books came out from Sovereign Press.
5.) Its been said (or merely hinted at) that Ravenloft's Dark Powers have granted spellcasting to clerics in the Mists.
This is, as you noted, a hint at best. Clerics who enter Ravenloft are said to feel a personal loss regarding their deity, but they still gain spells. It is shown (in the adventure
The Awakening) that deities can affect Ravenloft from their home planes (e.g. without entering it), but that the Dark Powers can distort their efforts.
Domains of Dread and the
Player's Guide to Greyhawk also note that demigods trapped in Ravenloft cannot grant spells above 2nd-level to clerics outside of it (but
Die Vecna Die! - which i thought was an excellent adventure - noted that some clerics can create a magic item called a
knucklebone of channeling that allows them to receive their full allotment of spells).
6.) Planescape described the concept of "near powers"; non-deities (such as demon lords, Archdevils, animal lords, elemental princes, or powerful celestial beings) who could grant their priests spells. Two Factions (the Athar and the Believers of the Source) could also draw power from their beliefs (The Great Unknown for the Athar, the Source for the Believers) and gain priest spells there too. Additionally, Many Dustmen didn't worship deities of death, but Death (with a capital D) as a force of the universe.
The issue of demon lords, arch-devils and other things as being "near gods" didn't originate with Planescape, as the question of whether or not they were gods, or had god-like powers, had been going on for a while. For example,
Monstrous Mythology had listed several demon lords as gods (e.g. Juiblex, Baphomet, Yeenoghu, etc.), and the article "The Lords of the Nine," by Colin McComb in
Dragon #223, talked about the Lords' statistics as being "avatars." It also noted that these near-powers could only grant up to 4th-level spells, and that they were subject to restrictions (the same restrictions as deities in 1E, below).
It's also worth noting that both First and Second Editions had systems that limited the ability of clerics to receive divine spells from their deities. In 1E, you could gain first- and second-level spells from faith alone, but third- and fourth-level spells required that an agent of your god be imbued with those spells, and had to relay them to you in person. For spells of fifth-level and above, you had to literally receive them directly from your god - as in, be standing right in front of him to get them.
While Second Edition never explicitly said this, Planescape did reference it (at least in terms of the "near-powers," in - if I recall correctly -
On Hallowed Ground). Moreover, while 1E had gods being demigods/lesser gods/greater gods, 2E not only introduced a new rank, the intermediate god (e.g. demigod/lesser god/intermediate god/greater god), but it also limited the maximum level of spells your god could grant by their rank. So demigods could only grant up to 5th-level spells, and lesser gods could only grant up to 6th-level spells; only intermediate and greater gods could grant any level of clerical spells (remember, in 1E and 2E, clerical spells went only up to 7th-level).
If you utilized both of these rules together (e.g. stronger spells require a more personal action to acquire, and weaker gods couldn't grant all spells), you had what I thought was a very intricate and interesting system of how gods and clerics interacted to send and receive divine spellcasting abilities. That's without even getting into the nature of how divine magic worked on the planes!
By the way, as I recall, the idea of having clerics of an entire pantheon was an option in
The Planewalker's Handbook (along with an option for being a cleric of two gods).