Magic. Ley lines and nodes fuel ritual msgiv thst enables high intensity agriculture. Like beyond today.I've been having a suspension of belief recently over a commodity that is buyable just about anywhere - bread.
Here's what got me stuck:
1. Bread is a cheap, freely available staple food.
2. You need huge fields outside the walls to make lots of bread.
3. Huge fields outside the walls will inevitably be attacked and overrun.
4. No more bread.
Assuming 1-3 to be true, how do you fix this problem while keeping bread generally cheap and plentiful?
These are geographically limited by natural resources (the ley lines and nodes). So we get small areas of farming with high yields, and dangerous wilderness nearby. This also prevents the strategy from covering the land in farms.
Urban areas and homes are also warded against dangers. The protection is limited, more like sanctuary (makes you less noticed/ignored) than a forcefield, but being inside your home at night is a real boon.
Other ways of dealing with it exist, like monster herding (dinos), low intensity hunter-gathering, etc.