The correct legal decisions were made in both cases.
In Rucho,
> Roberts made clear that partisan gerrymandering can be distasteful and unjust, but that states and Congress have the ability to pass laws to curb excessive partisan gerrymandering.
In other words, it's up to the legislatures to ban gerrymandering first before SCOTUS can rule on it.
As for Citizens United, the law granted the FEC to pick and choose who was allowed to exercise political speech:
> The Chief Justice wrote separately to explain why the Court went as far as it did. Essentially, Roberts explained what I’ve written in this article: that there was no rhyme or reason anymore to which entities were allowed to influence elections and which weren’t. According to the government, Michael Moore can but Citizens United couldn’t. The New York Times (a corporation) can but other corporations couldn’t. There were so many holes and exceptions to the law organizations had been essentially reduced to asking the government for permission to criticize it, and that is contrary to the essential purpose of the First Amendment. No more narrow exceptions given to one group but not another, the whole thing must go.
https://www.cato.org/commentary/michael-moore-trumpland-migh...
They even went as far as to claim the authority to ban books:
> A close reading of the transcript, however, reveals that General Kagan did not change the government’s answer. She suggests that someone who had their book banned by the FEC would have a “quite good as-applied challenge,” and suggests (wrongly, it turns out) that the FEC has never pursued books in any enforcement issue.
> This is not the same, however, as saying flatly that under no circumstances does the government have the authority, under the Constitution and the First Amendment, to ban books for political content. Instead, Kagan asserts only that the statute in question (203) does not currently cover books, while conceding that another (441b) does cover books — but she promises they won’t use it to go after books. Promise, pinky-swear!
(yes, that Kagan as well in case you were wondering)
https://www.ifs.org/blog/citizens-united-its-all-about-the-b...