THE CAUSE OF RIGHTEOUSNESS
A paladin swears to uphold justice and righteousness,
to stand with the good things of the world against the
encroaching darkness, and to hunt the forces of evil
wherever they lurk. Different paladins focus on various
aspects of the cause of righteousness, but all are
bound by the oaths that grant them power to do their
sacred work. Although many paladins are devoted to
gods of good, a paladin's power comes as much from a
commitment to justice itself as it does from a god.


Page 82 of the PHB, the setting of the Player's Handbook is the Forgotten Realms

The Forgotten Realms has been rebooted with every edition of the game, to in-universe explain the different ways classes and magic are handled by the rules. Moreover, an effort to downplay alignment has been worked into the 5th edition which I think has caused the Paladin class to suffer a little, by being the class most intertwined with it, which gives us a bit of cognitive dissonance as far as the class and its theming go.