I solved this one through my homebrew's world creation legend.
Essentially, the god of life & the god of death had an argument. The former thought mortals added a dynamic beauty to the world... the latter thought they were ruining the perfect paradise the gods had created. It almost broke out into a fight, until another god stepped in with a compromise.
Part of the condition was that mortals would be given a finite lifespan, so that no single being could wreak havok through eternity. Each would die of old age eventually, and be judged for their actions in the afterlife. In addition, for every mortal that the god of life allowed to be resurrected, the god of death would be allowed to create an undead mockery of another (rules-wise, of equal level: a level 12 character being ressed would spawn a CR 12 undead somewhere in the world).
So, at first, the god of life was reluctant to allow any resurrections. Over the centuries, however, it became clear that very few undead were actually being created, and the god became lax. At the point the campaign starts, resurrection is pretty much a given if you take someone to a high-level priest and meet their requirements.
That's when I'll spring the hordes of undead on the PCs. Turns out, the god of the undead was just keeping 'points' in reserve and chose to unleash all these undead at once rather than piecemeal.