Because some types of illegal behaviour of candidates can influence the vote.
This isn't about a court banning MLP because of her views or policy proposals (that would be very bad) but because she has been show to have comitted fraud by abusing EU money to pay for her own party.
Unlike in the US there are strict rules in France about how much politicians can spend on campainging and where the funds can come from that are intended to ensure a level playing field rather than favouring rich candidates.
If courts couldn't ban candidates who don't respect the rules then elections could be "bought" illegaly.