I'm losing legitimacy from battle despite wining, why?

Hey, I'm playing as Ramses and i'm currently at -2 legitimacy per turn from battle despite not losing a single one, I didn't quite got that mechanic, could someone explain it to me pls?