I don’t know enough to know whether they really deserved it, though I know there were a number of legal and contractual issues well beyond simple gender inequality.
Here is the rough skinny
1) A handful of years back, many on the US Women's national team could not sustain a career in soccer financially. The NWSL simply did not have the money to pay them a wage that was better than what they could do with their college degrees.
2) US Soccer was fearful that they were going to lose a large amount of national team players who would go on to other things
3) US Soccer reached back into their history and came up with a similar plan that they used for the men back in the early 90's, before MLS started. They decided to pay the NWSL salaries of the US National team players and while no one was getting rich, the national team players were given a salary that was far above the other NWSL players and allowed them to continue as professional soccer players.
4) A few years pass by and the women start to want equal pay for US national team games. On the surface, they were getting paid far less for National Team duty than the men were. But every time negotiations were held, US Soccer kept pointing out that they were paying their salaries and that the salaries had to factor into their over all compensation from US Soccer when comparing what they gave the men (which did not include any salary support).
5) They fought this out until they ended up in court in which the women lost, due to the salaries.
6) The women appealed and lost again
7) This is when they decided the only way to win was to use the court of public opinion and spread the gospel of equal pay.
8) US Soccer stood firm and the fight went on for way too long.
9) Eventually the deal US Soccer cut with the NWSL was set to expire. Once the salaries were off the US Soccer books, the two sides quickly agreed because US Soccer could finally give the women the exact same deal they gave the men.
10) This almost settled the whole thing, except for one MAJOR obstacle. The women also wanted the same bonus's the men would get from the WC's. This was a huge problem because US Soccer does not provide those bonuses, they come directly from FIFA. FIFA gives higher bonuses to the men than the women because they base it off of revenue.
11) This caused another prolonged fight until a compromise was made. The men decided to pool all of their bonus WC money that they would earn with the bonus money that the women would earn from the WC and then split it evenly. I believe we are the only federation that does this but I would guess it may become much more common in the future.
This ended the years long battle. It was very unfortunate because millions of dollars were wasted on lawyers when from the absolute jump every one could see the salaries were never going to be ignored when considering the compensation.
This is obviously a 50,000 foot view and there were many smaller steps in between but this should give you a rough outline of the process.