What I mean by this is that soldiers (most at least) nowadays and up to 2-3 centuries ago fought for their nation and were inspired by patriotism, whereas in the Middle Ages the concept of Nation-States didn't exist yet, thus making that reason not very likely. So what motivated them to fight? Was it gold? Was it loyalty to their lord? Or was it for another completely different reason?
Plunder, booty, and spoils. The military historian Herfried Münkler describes very succinctly how, at a decisive moment in the transition away from Medieval warfare, German mercenaries (Landsknechte) in the 15th/16th c. were practically a landless, roving lower aristocracy that used the army as a legal justification to confiscate goods from defenseless peasants, poorly defended cities, and their defeated enemies. I would highly recommend reading the first several paragraphs of this selection from his book, since you can apply this socioeconomic critical-framework to most military organizations of the Middle Ages.