We humans sometimes make arbitrary rules made to restrict a specific person or group of people just because we disagree with them. Sometimes we make those rules so we or a specific group can get away with something. We sometimes make bad rules for the same reasons.
But remember, rules are supposed to restrict evil and protect good. They aren’t supposed to be there to stifle freedom, they should protect it. Just like a fence that protects kids in the backyard, rules are made to remind you where the boundaries are so you and others don’t get hurt or go too far from help.
God invented rules to keep us safe and to give us a choice. Our governments have rules to keep people safe and to keep order. Rules were originally made for safety and order, and while sometimes we humans ruin rules, they’re supposed to be good.