Just as today, there are national laws and local laws. In the Middle Ages, the national laws were normally made by monarchs, and the local laws were made by local lords. There were Church laws, and these were made by the popes.
Towards the end of the Middle Ages, they were falsely accused of being the cause of black plague. Also, the Catholic church banned buying with interest, which the Jews did. In other words, Jews were scapegoats and the Church made laws that made them look terrible.
Much of the chaos of the Middle Ages was the result of invasions of various people in the Age of Migrations. But that was only in the first quarter of the Middle Ages. I really do not think the Middle Ages were much more chaotic that most other ages once that time was over.