That's if the main character is a mage, and not all NPCs have high intelligence. Well, some spells are still garbage anyway, why bother learning them
For the extra experience.
Overall, even with crappy stats you can raise intelligence and learn all spells. I don't remember how it was in BG1, but in BG2 there are also items that boost intelligence. In short, thanks to potions — it's doable.

