Er...that's exactly how it worked in 0e-1e-2e, and still does. Random availability for the win! Or not-so-random availability should a DM want to keep a spell rare or write it out of the setting.
Further, being able to learn a new spell you'd run across wasn't automatic - you had to roll for success, with usually-reasonably-good odds based on your Intelligence; and if you blew it you had to wait until either you gained a level or your Int score improved before you could try learning that spell again.
Edit - thoroughly ninja'ed by
@billd91 above.