Wow. You are what is wrong with America. Seriously. Cops have a job to do and ignorant, uneducated sovreign citizens such as yourself make their job that much harder. He was obviously breaking some sort of law or city ordinance or the OP is not telling us the whole story.
Yes, cops have discretion. But they do not always have to give warnings. This cop used his discretion and decided to give OP a ticket. The ticket can't be more than $100 so I don't see why people are making such a god damn big deal out of it. He was impeding the flow of traffic by going to slow. Impeding the flow of traffic is against the law. OP broke the law and got what he deserved. If he wants to fight it in court then he is well within his rights to do so. But you don't have to act like an ignorant dickhole to me and be extremely rude.
Also, how do you know what this cop is going through? He could have just cleared from an accident scene where a young child was killed. He could have just cleared from a triple homicide scene. He could have just learned one of his cop friends was shot in the line of duty. Believe it or not, cops are actually people too. They have feelings. Maybe this cop was in a bad mood or was having a bad day. You don't get to say who deserves to wear a badge or not until you put yourself in their position. Please educate yourself before spewing your ignorant sovreign citizen bullshit all over reddit, please. Thanks.