Solo is the quintessential crazy goalie (they are common in hockey and soccer--I played keeper in both...).
She was a difficult and not particularly well-liked teammate. It didn't start with her criticism of Scully in 2007, but that sure didn't help. She would lash out at teammates frequently, she had been disciplined for a domestic violence arrest (she beat up her nephew, though why is an open question--the criminal charges were eventually dropped), and for accompanying her husband while he drove a USWNT van while intoxicated (he got a DUI for that one). And she most definitely did not get along with Coach Ellis. Calling the Swedes "cowards" was bad, but my understanding is that it was her reaction to the suspension following that, not the "cowards" comment itself, that led to her dismissal.
Fair to say that her suing US Soccer over wages (which, of course, the whole team has done now) in 2015 didn't help. And I believe she is on record saying that if they invited her back, she would say no unless the wages were fixed to her liking.
She was/is a great talent as a keeper, but also a headcase. In a lot of ways she was a great ambassador for the game because, let's not kid ourselves, she is among the most attractive women to play for the USWNT, but when you're an ambassador, your conduct gets higher scrutiny.
A pack player who made a comment like she made after the Sweden game may not have been suspended. A star/ambassador for the men's team might have been suspended, particularly if he already had a dicey record with the team. And whether that player would end up dismissed entirely would likely fall into the same category as what happened with Solo: the details matter.
And at the end of that, if the USWNT really felt she gave them the winning edge that they otherwise wouldn't have, they would probably have tried to get her back. While she may still be the best, #2 may have been close enough that USWNT could afford to drop the baggage. And even for a position like keeper, if #2 at stopping the ball gets along with her teammates better, that might make the whole team better than with the better ball-stopper.