They mostly developed because men did most of the work. Agrarian societies required hard work and toiling out in the field while pastoralism required people to take care of numerous animals at once and these animals often needed human strength and speed. Thanks to this, men were the ones who did those jobs and since they were valued more than taking care of the household, gender inequality originated.
I can see 3 main groups:
The poor - they have a promise of a “reward” in heaven if they obey Church and King.
The Church and King - it provided them with great temporal power. Ever hear of the Divine Right of Kings?
Those people that Xtian armies or “missionaries” held at sword point and gave them the choice of convert or die.