I have seen people like this. They can put on the act with strangers, yet be totally miserable around their family and friends.
I suppose they make the false assumption that their family and friends will continue to take their nonsense, where they know a stranger would likely call them out.