Everything depends upon the state, the type of offense, the number of prior offenses, and perhaps even what happens in the courtroom. If your friend informed the judge about how silly he thought the laws were, it is possible that the judge used her discretion to dole out a penalty that was appropriate and within the limits of the law.
DUI is a very serious offense which many don't take seriously when nobody gets hurt. It's like being careless with a gun -- maybe worse. When you are driving recklessly on the road there is a great chance that you may cause a collision with another vehicle, resulting in someone else being seriously injured or killed. If the second offense involves drinking, you can understand that a judge might feel that the lesson still needs to be learned.