Here is my long-winded answer.
Paladins are a class with a moral code behind them. They are a restricive class at best (LG align, MC penality). The problem IS, the code is too underdefined and many DM/PCs are not on the same page as to what it means.
Line by line:
A paladin must be of lawful good alignment and loses all class abilities if she ever willingly commits an evil act.
The code is sticky on "willingly" and "evil". Both are very vague. Willingly means the paladin should know the act is evil but does it anyway. However, the "greater good" arguement sometimes appears (aka kill Hiltler as a child to prevent the holocaust).
Evil, like good can be subjective (even in D&D) and commonly the cause of this headache.
Additionally, a paladin’s code requires that she respect legitimate authority,
"legitimate authority" is another vague term. What if its evil and corrupt? What if it condones or even commits evil acts? Can a paladin be a freedom fighter (a traditionally CG role) What makes it legitimate? This could differ from person to person.
act with honor (not lying, not cheating, not using poison, and so forth),
Again, "greater good" issues raised here. Lying to protect the Queen from ambush? Cheating to rescue a slave who might be the "chosen one"?

Sedatives and non-lethal knockout drugs to prevent bloodshed?
help those in need (provided they do not use the help for evil or chaotic ends),
Order of importance? Should the paladin help get kittens out of trees on his way to vanquish the evil dragon?
and punish those who harm or threaten innocents.
What kind of punishment? The european "stocks and fines" method of handling thieves is a bit different than the arabic "loose a hand" method. Is a paladin justified to use lethal force in any or all situations that threaten or harm innocents?
See? The code is bullocks as written because I can read into the code and see one thing (Hiding in a wooden horse is cheating) and you see another (Its to rescue the princess and save lives from a long siege war). Couple with the fact its one of the FEW times DMs hold direct power over a PCs actions (don't do that or else) which has lead to a couple DM abuse situations. (I lost my paladinhood for swatting a fly).
Druids (the next closest to having a code) got this much more before being allowed more diverse alignments (common question, how does one play balance? Switch sides during a fight?) Clerics of specific gods fall into this realm as well, but gods tend to spell out thier ethos a bit moreso. Bards, Barbarians, and monks just have "You can't be"s not codes that cost them thier abilities.
Ergo, the poor, misunderstood paladin gets caught with a so-vague-its-unplayable code. What to do
1.) ASK YOUR DM: Ask HIM what he thinks the code means. Some are much more liberal with paladinhood than others; allowing drinking, marriage, even white lies (or "certain points of view"). Others are puritian strict and will cast you into fighter-levels upon THINKING of doing an "evil act". Some put empathsis on GOOD, other on LAWFUL. Ask before you loose it.
2.) Error on the side of caution: Think your treading grey ground? Back off. Some DMs remove paladinhood for blackness, others for the absense of white.
3.) Check with other Players: Got a sneaky CN rogue, a CG half-orc barbarian and a LN brooding mage? AVOID THE PALADIN. Your gonna be in a whole lot of headache, esp if majority rules.
DMs, try some of these
1.) Avoid moral questions: Well, those that HAVE no real right answer. Esp those where there is NO way you can win AND keep your paladinhood. Thats unfair.
2.) Don't like them? BAN THEM: Its simpler than trying to prove how dumb they are. You might even avoid a sore or angery player in the process.
3.) Talk with a potential paladin: TELL him what you are expecting, and ask what he thinks the code means. Compromise on areas where the two ideas are off. If they are WILDLY off base, suggest a different class (cleric, holy liberator, even blackguard).
4.) DEFINE the CODE: Nothing wrong with having an idea BEFORE the paladin enters play. Write it out if you have alot of paladins come through.
These steps lead to happy, productive paladins. Now go out there and smite demons!