The judge didn’t even NOTICE he was being called Sir because he IS A ‘SIR’. It never even registered with him.
He’s not saying “sir”. He’s saying “Yes, your honor” but his voice trails off and your mind interprets the “your” as “sir”.