I am going to second
@Micah Sweet on this one. I, as DM, enjoy world building first, time with my friends 2nd, and engaging adventures/campaigns 3rd. They are interrelated and I value all of them, but that is my personal order of enjoyment.
So I want my world to make sense as a world first and a game 2nd (as much as is reasonably possible and within my capability). Now, I don't think the PCs and NPCs have to follow the same rules 100% as long as they feel similar. So I don't mind if an NPC has a spell the PCs don't, to me that is expected in a living world. Could the PCs learn that spell, potentially. That is what downtime is for in my game.