The anger of Shrek at the world has to do with how people judge him; he does not appear to them as he appears to himself. We are allowed to see he is a man who loves his private life, lacking both the inclination & the need to harm people. But his fear of mobs keeps him away from the city; the villagers’ fear of him keeps them trying to kill him. It makes you wonder whether we would not all be good or happy without this kind of misunderstanding.
We fear what is unlike us. Making everyone alike is one solution, which seems to be the way of the city, as shown by the princeling, & may be thought to define the good. Shrek is told the princeling acted by signing an eviction order; he sees the fairy-tale creatures rounded up & checked against lists, the bounties on their heads paid according to established standards. A soldier walks up to him reading him the writ, but his soldiers promptly abandon him. As it turns out, laws cannot simply enforce themselves.
Abandoning the city, alternately, & living a solitary life in nature, which seems to be the way of the wanderer, as shown by Shrek, may be thought to define happiness. Halfway solutions seem bound to cause trouble: they are neither sufficiently conventional nor sufficiently natural. They lead man to ask himself whether others like him rather than asking himself what would make him happy; at the same time, they do not allow him to help others honestly, because they always keep him wondering how to use others for his own interest.
Shrek embarks on the quest the princeling orders despite the Donkey’s suggestion of going to war; Shrek says he’d rather avoid the horrors of war; at the end, the Dragon has to come & eat the princeling who is about to kill both Shrek & his princess. Presumably, this was necessary.
The Dragon is not altogether friendly, apparently; you can comically call it the devil in the machine. The princeling wanted to order everything perfectly, assuming that order is inevitably good. Shrek made the opposite mistake, for he thought that minding his own business is sufficient for justice, ignoring, & thus implicitly denying, the laws.
The princeling is perhaps killed because he is more conventional than Shrek, who has in common with the Dragon the suggestion that ugliness & nature go hand in hand. But the princeling & Shrek & the Dragon all have in common the opinion that their own property must be protected violently. The only difference is that only the princeling behaves tyrannically. Also, it’s worth noting Shrek is male, but the Dragon female.