They are quite expensive to train.
Consider: a first level fighter is expected as their starting equipment to have scale mail (50 GP), a longbow (75 GP) and a greatsword (50 GP), plus assorted small stuff. Let's call it 200 GP.
A wizard? A blank spellbook is 15 GP and a component pouch 5, but they also scribe every spell in there. But they also have to scribe all their spells. That's thousands of GP.
I think that's a reasonable approximation for training costs. You can get 5-10 fighters for the cost of one wizard. Now sorcerers and clerics, those are cheap for the power output. You want magical bloodline breeding programs and free religious education.