Well, in AD&D at least, the only way to become an arcane caster is to be a wizard (or illusionist, maybe). But there's multiple ways of owning a castle other than building it yourself. For instance: inheritance. Maybe your parent or grandparent was a name-level fighter, but then they died and the title passed on. While the monarch may insist that their children be warriors in their own right, that doesn't mean they die only after their kids reach name level--and that ignores those monarchs who decide to train their children to be diplomats. Or, a powerful wizard could claim the castle after turning the name-level fighter into a frog. Or, you could hire an assassin or mercenary army to kill or overthrow the ruler so you can claim the throne for yourself, even if you've never lifted a sword on your own. And then there's the old chestnut of winning a castle in a high-stakes poker game...