The H-4 expansion Obama did, just like his DACA expansion, was illegal, as the Fifth Circuit has already established. The Trump administration is simply following the law by withdrawing the illegal expansion that the DHS lacked legal authority to do. The H-4 specific lawsuit from Save Jobs USA is using the same principle from the Fifth Circuit decision.
The legal way to have done H-4 or DACA was with appropriate legislation during the time the Democrats held the Presidency, the House, and a filibuster-proof Senate majority... yet they chose to do absolutely no changes in immigration law (DACA or other amnesty, H-4 or other expansion). In fact, Senator Schumer railed against amnesty himself in multiple floor speeches. Now, ask yourself why that is.