1. You shall attend Mass on Sundays and on holy days of obligation.
2. You shall confess your sins at least once a year.
3. You shall receive the sacrament of the Eucharist at least once during the Easter season.
4. You shall observe the days of fasting and abstinence established by the Church.
5. You shall help to provide for the needs of the Church.
From what I understand, the commandments of the Church were put in place to make sure you can maintain a healthy relationship with God while still helping the Church. It is there to make sure you have safe passage into heaven and are allowed to go to heaven in general. As for the medieval way of the Church, the commandments were there to make sure they could make money by having people pay tithes and buy indulgences they also tried to maintain control by having everyone not talk to the excommunicated. There was also a belief put into play that if you do not follow these commandments you go to hell.
Bonus: The Holy Days of obligation Christmas Day and the Feast of Mary, Mother of God.