The royals/elected government could tend toward one alignment, bureaucrats another, nobles others, churches others, municipal leaders others, the courts others, etc.
In quasi-medieval D&D societies, governments are personal. If King Bob I, chaotic evil, dies and is replaced by King Bob II...