I hate to admit it, but I was "that kid" as a child. For me, I really only learned when I got to my teens and was trying to figure out how to fit in socially more and why people didn't seem to like me. It finally dawned on me that I didn't HAVE to correct everything I saw or heard that was incorrect. And that arguing was not always a good idea. I am not sure I had the self control, or enough desire to please other people prior to that age to fix this... It isn't that my parents didn't tell me, I just didn't give their comments any notice. Also, as I'm sure many other adults on the site can attest to, it is sooo frustrating to be small/young and be treated like you are dumb or furniture. I think that gave me an attitude problem that didn't really get resolve until I was a teenager.
That said, my youngest (gifted) D has some of that characteristic, but is MUCH better now that she is a teenager. One phrase we used a lot was, "Just because you CAN do something doesn't mean that you SHOULD do it." Also, for a while we did not respond AT ALL (completely ignored) any comment made in "that tone". I might say, "I am not going to talk with you until you repeat that in an appropriate tone". Just to make sure she knew why I was not responding. Then NO REACTION unless she cleaned up her tone.
She is Aspie, so she often didn't see how annoyed her comments were making people. So when other people were involved, I would sometimes comment to her afterwards about how her tone/comments might have made the other person feel. She was sometimes surprised, and even embarrassed. I didn't do it in front of the other people, though.