What is the psychology of people who insist on arguing with the cops to their own detriment?

The guy in this video would have just gotten a ticket, but he managed to argue himself right into jail. I don't understand what he gained from doing this other than trouble. He is very fortunate that the police were as professional as they actually were in this situation because his demeanor and language were infuriating.

https://www.msn.com/en-us/news/other/sf-official-faces-string-of-criminal-allegations-and-keeps-landing-in-the-jail-he-oversees/ar-AA22D7zU

What is the psychology of people who insist on arguing with the cops to their own detriment?
Post Opinion