Not all clerics can spontaneously cast cure spells—evil clerics and neutral clerics who choose to channel negative energy instead spontaneously cast inflict spells—but otherwise, you’re completely correct. The spontaneous spell class features of clerics and druids are there to save you the trouble of preparing those spells. You can prepare something else, and then if it turns out you need cure or summon nature’s ally more than that thing, you can still have it.
Do note, however, that every single cure or inflict spell is also much, much weaker than a typical spell of its level, and summon nature’s ally, while decently strong, has the large complication of having a “1 round” casting time (i.e. the summon does not appear until your next turn, and that only if nothing disrupts your concentration on the spell). This is likely an intentional trade-off for clerics and druids—you can get this spell exactly when you need it, but it’s not going to be “as good” in some general sense (as opposed to the specific situation you’re in) as whatever you are replacing.
There are two cases where you still could theoretically want to prepare spells you can cast spontaneously: metamagic and the healing domain. If you know you will wish to use metamagic on a spell, it is better to prepare that spell with the metamagic than it is to spontaneously cast it with the metamagic, as the latter extends the casting time of the spell.1 And domain spell slots cannot be spontaneously converted to cure or inflict, so for example if you channel positive energy and have the healing domain, for most domain slots, you have a choice between a cure spell, or another spell that will not be eligible to convert to cure later. Ultimately, though, these are both kind of moot points—the cure spells are so bad that you shouldn’t waste spell slots trying to metamagic them, nor should you take the Healing Domain.
(It is because of this weakness of the cure spells that it’s also good to buy a wand of cure light wounds to heal in between combats—it’s the most efficient healing in the game,2 it preserves your best spell slots for better things than cure spells, and between combats you’ll usually have the time you need to zap the wand several times. Many clerics only use their spontaneous cure ability in dire emergencies. It’s only once you get the fantastic heal spell that healing in-combat becomes something worth doing even when not absolutely forced to.)
In the case of cure or inflict, this makes the spellcasting take your entire turn; in the case of summon nature’s ally, it makes the summoning take two entire rounds so by the time you get the thing, the fight is probably pretty much over. Note that there is a difference between a “full-round action” casting time, as with the spontaneously-metamagic’d cure, and a “1 round” casting time, as is the case for summon nature’s ally—the former takes your entire turn but still happens on your turn, while the latter takes your entire turn as well all the time until the beginning of your next one, making you vulnerable to disruption and delaying the actual effect of the spell.
That is, in terms of hp healed per gp spent, and actually that’s not quite true as a caster level 1st cure light wounds will heal 2-9 hp (average 4.5), while a caster level 1st infernal healing will heal 10 hp (over the course of 1 minute). But infernal healing causes alignment problems for a lot of parties/clerics, and celestial healing is complete garbage thanks to its duration of 1 round/2 levels.