I'm wondering, if the majority came to the conclusion that it's another branches' (or the states') problem to address, why did the court take on this case other than to state #1 "It's not our branches problem." and #2 "Courts shouldn't be addressing this issue, see #1." That's a full on punt without forcing anyone to address the issue like this is a problem but not ours to fix.
The court initially gained the power of judicial review under Marbury vs Madison. SCotUS can standardize the application of the law by interpreting it or the constitution in a specific way like ruling that the "Well regulate militia," part of the 2A is less important than "the right to bear arms" part. The court has used this power before to step in when other branches or states could not agree or even work together like desegregating public schools (Brown V Board of Education, unanimous decision). I think we are at a similar point with gerrymandering. Some states benefit from it and the people in power want/need it to stay in place so like term limits won't be considered at all until the power balance flips. But the power balance can't flip due to gerrymandering. SCotUS won't put their finger on the other side of the scale to force that change and address the issue either.
I'm wondering how much the decision gets into one person, one vote doctrine. Districts within a state must have similar population and voting power. If a district is designed to favor a specific party they could hold such partisan gerrymandering makes voters of the opposite party's vote effectively not count and violate One Person, One Vote precedent. It may then be held that districts should be drawn in a way that doesn't involve partisan lean along with other protected classes like race or sex. The hard part isn't the decision itself but how the majority opinion lays out or sets up what comes next. I think that's where the court couldn't agree and why we have such a milquetoast rejection of the branches power to do something.
If they couldn't agree how to rank districts on partisan bias (say with the efficiency gap), where the line is drawn for gerrymandering (if it's 60%, then they'll be drawn to 59.99% next time etc), or how to advise redrawing without stepping on states rights to determine how voting works (the constitution lays out a few requirements but leaves much to each state to decide), then this decision makes sense. But they probably could have sorted that out when considering to take the case at all. Maybe they needed to take the case due to the mess of initial decisions in lower courts as it would come up again and they wanted to get ahead of that.
I'm reading this as a punt but hard pass on making anyone responsible for the problem. I think you're right though as if the vote went the other way fallout would be messy, possibly get the court called out for activism (I think we needed it here but that's my opinion), and not consider possible responses that make the problem worse or legal arguments like if gerrymandering for party isn't valid like for race then party affiliation is a protected class.
After typing this out, I think they could have rejected the case with minor fallout with notes that it needs to be handled by the proper branch of government like Congress or the states. But they accepted the case then couldn't sort out how a ruling against partisan gerrymandering would work or fallout, and here we are.