Well, having followed Justine Musk's blog... Elon could have been a lot less competent in his personal relationships and plenty of people are, but he screwed up his first marriage with what are essentially rookie errors. And I do know that, being partnered myself and in a stable relationship for 18 years because *I learned how to do it*.
It takes two to tango.
Everyone is always very clear what the other person did wrong and not necessarily what they did wrong. Her repeated need to shout to the world after the fact what an awful person he was says more about her than him. It's no secret she's very bitter and angry. Maybe move on.
Their lives together changed dramatically and when that happens it often sends people in two different directions - especially when fame and money is part of that dramatic change.
The death of a child is often unbearable. While it sometimes brings a couple closer together, more times than not it rips them apart.
The polite way to put it is, perhaps, that he had other priorities than marrying someone he could live with for the rest of his life, had other priorities than making his marriage work, and decided to let it fail. From what we can tell from what's come out in public, he proceeded to screw up his second marriage largely by repeating the same mistakes.
It takes two to tango. It's not like she didn't know where his priorities laid or his time was spent.
Both times the marriage ended amicably, which is quite different than the first one. We don't see her blogging about what a horrible husband he was. Hmm...
25 years of marriage with plenty of days in there of wanting to kill each other...if only a weapon had been handy...
There are many recipes for lasting marriages, but 'marriage smarts' usually isn't in the list of important must have ingredients.
I'm quite sure he made mistakes, maybe even repeated some mistakes along the way, but surely you can find enough to criticize him about without getting into the personal arena, which is often behind closed doors (and should stay there) and which we aren't privy to from both parties.