My guess is that he was taunting the cops.
That does not justify what they did. However, it does illustrate a principle we can all learn from here: Just because an officer does not legally have the power to abridge your rights does not mean he won't. If you get to cocky with a LEO, you may get a butt-whoopin' from an unscrupulous one. If there is a video device handy, the cop may get into trouble and you might receive compensation. Most likely, though, it will be your word against his--and we have already learned that this particular officer is unscrupulous.
In an altercation with the cops, being right isn't all it's cracked up to be.