Last 2 elections you had judges in 7 states redo maps drawn up by the legislature. In Pennsylvania a new map was bi-partisan and the state supreme court made up their own map.
This goes for both parties. Pennsylvania was a victory for the Democrats and Florida for the Republicans. The State Constitution in many states and the Federal Constitution gives the legislature that power.
The US Supreme Court needs to rule on this before the next election cycle.
When the courts do the redistricting, they're doing what the legislature was elected to do. And what they are doing is gerrymandering.