This is an interesting topic!
It can be both. A massive ego that no one should ever challenge. Or an act to attract attention. My sister-in-law is a fine example. There are so many lies I could have called her out on but wasn't going to waste my energy. She is a controlling/dominating person, obnoxious when she's had an alcoholic drink. I seem to be the only one in the family who sees through all this bulls**t!
Her behaviour has even been excused as "that's the way she is". Perhaps I should have called her out from the beginning. She even does it to her elderly mother-in-law. It's just become normal behaviour.