Alignment is a useful tool to ensure consistency in player actions (while keeping in mind that intent is important).
If my Paladin decides to start going around animating corpses and using them to fight for him, I can explain to him that that act is considered evil in my setting and thus he shouldn't do it if he wants to keep his powers (which are granted to him by a Lawful Good god). Of course if he wants to go rogue, that's fine - it's his choice.
But you can do it without alignment just as well. Even when referring specifically to paladins, here's how 3.5 handles it.
A paladin must be of lawful good alignment and loses all class abilities if she ever willingly commits an evil act.
Additionally, a paladin’s code requires that she respect legitimate authority, act with honor (not lying, not cheating, not using poison, and so forth), help those in need (provided they do not use the help for evil or chaotic ends), and punish those who harm or threaten innocents.
What the fuck is an "evil act"? What is "willingly"? Cue to endless speculations about what is right and what is wrong, if committing an evil act under duress counts, "what about hostage situations", and so on. Nevermind the endless "I was tricked into doing evil, and DM took my class features forever" situations that used to crop up all the goddamn time.
Book of Exalted Deeds and Book of Vile Darkness did not help, not even a little, because both answer the question "what is an evil act", and their answer is so nonsensical and removed from humanity, it becomes nearly impossible to play paladin.
Meanwhile, 5e's version of the default paladin lacks any alignment restrictions, but somehow achieves the same thing without all the mess inherent to the alignments.
Though the exact words and strictures of the Oath of Devotion vary, paladins of this oath share these tenets.
Honesty.
Don't lie or cheat. Let your word be your promise.
Courage.
Never fear to act, though caution is wise.
Compassion.
Aid others, protect the weak, and punish those who threaten them. Show mercy to your foes, but temper it with wisdom.
Honor.
Treat others with fairness, and let your honorable deeds be an example to them. Do as much good as possible while causing the least amount of harm.
Duty.
Be responsible for your actions and their consequences, protect those entrusted to your care, and obey those who have just authority over you.
There is some room for interpretation here, but I think everyone will agree that if a character follows these tenets, the end result is what is commonly thought to be a lawful good character.