In Denmark nobody adresses each other formally, unless you're royalty. Parliament also does it during debates, but that's pretty much it. It's weird when it happens, and it's usually some store clerk that does it out of a misguided attempt at politeness, but to me at least it has the opposite effect. I am not a Hr. (sir), I'm just some dickhead buying cigarettes at 1 AM.
I Denmark we at least pretend everyone is equal. The CEO of the company is just John. We eat lunch in the same break room at the same time.
More seriously, I think it's possible that "sir" can be used in a way that casts everyone as equals. Like, you can be in a crackhead's den and recognize that he is in important person in that environment.
Some of it’s weird posturing (I’d put the “sir” thing in that category) and a bunch of it’s a combination of actually-effective and folk-supposed-effective ways of speaking to dazzle jurors, plus probably some other motivations and influences thrown in (some Hollywood-military turns of phrase and vocabulary, certainly)