People put cavalry in the back because they move faster than infantry, so if you put them in the front they'll attack on their own and get slaughtered (cavalry tend to be greatly outnumbered). If you time them to hit with or after the infantry, it's more likely they'll live.