Vancian Magic
According to legend, Gary Gygax and Dave Arneson's magic system was heavily influenced by Jack Vance's The Dying Earth series of science fiction novels.
In that series, wizards need to memorize spells in order to use them, and the moment a spell is cast it disappears from the wizard's mind.
This came to be known as the "Vancian magic system".
The main tenants of the Vancian magic system that Gary and Dave gleaned from Jack were these:
Magical effects are packaged as distinct spells so each spell only has one effect. For example a spell that throws a giant ball of fire at an enemy cannot also be used to create a tiny ball of fire to light a candle.
Wizards learn more powerful spells as they advance in level
Wizards have to choose which specific spells they will use in advance, and memorize them (relearn them) each day
Wizards can only use a limited amount of magic per day, because it is super complicated
Now while we can all respect the inspiration for D&D's magic system, there are parts of Vancian magic that are 'neat in fiction' but not that 'fun to play' in a game.
Specifically the part where you have to guess which spells might be useful each day.
Just imagine...
You and your party are in a tavern cellar and find a secret trap door leading into the darkness below. You descend the rickety ladder to find an ancient tunnel leading back into the mountain. As you travel along the tunnel your breath turns to mist, it is getting colder. In the darkness ahead the tunnel gets larger and you can make out a giant old door at the end, half-broken off of its hinges. The cleric whispers with a quivering voice, 'I sense an evil presence that I have never felt before, an ancient evil'. The halfling silently creeps to the door and peeks inside whispering, 'I don't see or hear anything moving'.
Your party tries to quietly sneak through the broken door but just as the last member of your party slides through, the barbarian's fur cloak snags on the broken splinters and with one good yank he pulls the entire door down to the floor with an enormous crash echoing in the large dark chamber beyond.
The hackles on the back of the elf's neck stand up as she frantically darts her head side to side, peering into the darkness until her gaze rests in one spot and she whispers, 'oh no'.
A glowing set of bright blue eyes alight and rise up before the party until they nearly reach the ceiling, and then a low rumble starts.
With her gaze affixed, the elf slowly draws her arrow while backing up towards the door and she breathes out quietly, 'dragon'.
The wizard looks up from his spell book with panic and a quivering voice, 'DddDragon? We were in a town, how could I know. I chose Charm Person , Better Bargain and Create Peach Preserves as my spells this morning. I chose poorly'.
And so ends your party's adventure.
Apart from not knowing which spells to choose ahead of time, having to relearn the same spell each day doesn't make logical sense either. If a mage or cleric has cast the same spell for 15 years of their life, they will remember the words to chant and the hand-waving gestures required without any need to look them up in their spellbook. If the spells are so complicated that a spellcaster forgets the details every single time they cast them, those spells could never be suitable for combat situations where spellcasters have mere seconds to cast them.
While I am sure it does result in some funny situations, this is one of those rules that has always made the D&D gaming experience more frustrating than fun. Very early on, all fantasy video games except 'official D&D' video games discarded the 'choose your spells ahead of time' Vancian magic rule.
Later versions of D&D have made the 'memorize spells' element of Vancian magic optional by adding Sorcerer classes that are able to "cast at will".
Now, limiting the number of spells a mage or cleric can cast per day is logical and balances magic use in the game. When spellcasters use their bodies as conduits for magical energy, it will take a toll on them physically and they can only keep it up for so long before their body requires rest.
B/X Edition 'House Rule'
Ditch the 'have to choose specific spells each day' rule. Let players cast any spell they know 'at will' as long as they have spell slots left to cast them. Basically using spell slots as magic points similar to hit points. Its more fun to play and that is what B/X is all about.
NOTES
So it turns out Jack Vance influenced more of D&D than just magic. A great article talks about what else Gary borrowed from Jack over at Goodman Games: