What creates loyalty? Sure greed is a factor, but greed in itself is the tool of a desperate commander, and a double edged weapon at best.
What makes loyalty more so in my mind is the situation of any soldier. Soldiers in any time must count on each other to survive. When one man proves himself to his mates in times of battle, that creates a firm bond, a thing that goes beyond any other sort of human relation. Even more powerful is the respect given to a commander who has earned it. To serve under incompetence is the greatest woe, but to really know that your commander has what it takes to secure victory, to believe that your commander is blessed by the gods, ever victorious and fair to all, that sort of loyalty makes men fight in battles simply to be able to say they fought for ___ at the battle of ____.