He wasn’t jailed for 37 days. He was jailed indefinitely. Every day he didn’t know if things would get worse. He didn’t know how long he was staying. He was already in the absurd scenario for being jailed for a meme so anything was possible at that point. He happened to get out after 37 days.
Would you do that if you were an ex-law enforcement officer who's racial profile puts you under the protection of criminals on the yard that largely support the person you heckled while not knowing that it was only going to be 37 days?
At some point, barring him getting beaten to death in jail, this was always going to get in front of a judge who'd go "uh what the fuck?!" It's about as slam-dunk of a situation as you could come up with.
I could say that about a litany of court cases in the previous decade, yet here we are, our president winning immunity for all tax evasion, in the past and future, for his whole family, and getting seditious white supremacists paid while doing it.