It's precisely this narcissistic personality which some people love about him.
Personally I blame marvel movies. Many immature people think the world is a superhero flick and Elon Musk is a real-life Tony Stark: arrogant billionaire genius who is going to fix the world from his superlab.
In the first movie he commits extrajudicial killings (maybe these are murders, maybe not) and then when leaving the scene almost kills a 'friendly' pilot, while laughing about it all with his buddy.
I'm Civil War he tries to kill the man who murdered his parents, for revenge, not justice.
And when Stark almost killed thr world through Ultron, after being traumatised by near death experience saving NYC, he continued his self righteousness and ran straight for the Sarcovia Accords as a counter balance.
If you look at the Avengers from a realistic perspective then they're a group of anarchistic, unhinged, uncontrollable vigilantes who resist any kind of oversight or procedures to reduce collateral damage.
Honestly I would rather blame some fans (Musk included) of great shows like Rick & Morty, IASIP, Breaking Bad or the Joker movie for mistaking protagonists/anti-heros/funny characters for people to emulate and completely missing the point.
If you cheer the part you're supposed to laugh at/feel sad for, I start to get a picture of what "dangerous" media could mean.
As a counterpoint to shows like the ones you list (where they revel in showing terrible, yet likable, characters doing terrible things), the show "Mythic Quest" flips and shows terrible characters struggling with trying to change within themselves, and how it's a slow, discontinuous process where it's possible to both backslide and recover.