I didn't realize that Jaehaerys was their grandfather.
Well if that's the case, then why was their an issue around the succession?
If Jaehaerys eldest son died but had a son of his own, then that son is their heir. It goes from father to eldest son to his eldest son.
The same way Jon Snow is the heir moreso than Daenarys because he is the eldest son (well, surviving son) of the mad kings eldest son Rhaegar.
Aemon was The Old King's oldest living son. Aemon only had ONE child. His daughter Rhaeneys.
Baelon was the Old King's second oldest living son. He had two sons. Viserys and Daemon.
So the issue was should the throne pass to the heir's only child (Rhaeneys), or skip her and instead pass to the heir's brother (Baelon).
It's like asking if Winterfell should pass to Sansa or Benjen if all of Ned's other kids are dead.
Based on common succession laws, it should have passed to Rhaeneys. This is what everyone expected when Rhaeneys was growing up. Her grandmother Queen Alysanne commonly refered to her as "our queen to be."
But when Aemon died, Jaehaerys instead chose Baelon to be his heir.
Jaehaery's wife Queen Alysaane was so furious at the decision that she left Jaehaerys and went to live on Dragonstone.
Then Baelon died.
So the issue came up again.
Rhaeneys and her line, her claim coming from being the only child of the eldest son, a claim that favored primogeniture.
Or Viserys and his line, his claim coming from being the first born male from the second eldest son, a claim that favored male primogeniture.
Corlys raised an army in defense of his wife’s claim.
Daemon raised an army in defense of his brother’s claim.
Jaehaerys called a great council to let them decide.