okay, this won't be a brilliant explanation but here goes
rumours abound of voter fraud in the election - there's an issue with "calibration drift" - you press the button for the candidate you want, but just as your ipad often selects the wrong thing, it selects the wrong candidate.
Naturally Alicia agrees to have this investigated because she doesn't want to have, or be seen to have, won the election unfairly.
as investigations take place - remember the lawyer she was so pleased to have on her side for that? - it becomes clear that the machines may have been tampered with for other reasons. Possible scenarios include that Peter's election may have been fraudulent. Peter says that he hired Ernie Nolan to look after the machines - Ernie Nolan was the guy who, in early days, tried to bribe Alicia. Of course Peter wants to be sure his hands are clean.
As investigations go on, it becomes clear that machines were rigged in a different election and the party needs Alicia to back out of clearing her own name in case the other dirt is exposed; it would threaten the Party's majority.
My feeling - and some other posters - is that Peter knew about this all along.
I'm still unclear about whether Alicia was put in to run as a way to deflect from all this or if her being caught up in it was simply an accident. The latter seems possible because the Party might have considered having both Florricks in high office as a political dream team.