You make a good point, but such situations are never done to favor all voters, it is done to give an advantage to a particular group of voters, masked as “a choice”. The real objective is quite the opposite. That’s why such laws are adopted, and when they are set aside it is almost always the act of a corrupt judge or judges. Certainly that was the case in this example.
I think the legal point is that he lost the nomination of one party and then tried to enter the general election as the candidate of another.
Since the Constitution does not acknowledge that parties even exist, I think a legal case would be problematic.