The Rambam divides all the mitzvos into 14 categories. [III,35] Each of these categories serves a particular purpose. They are:
1. Basic principles of faith, including repentance and fasting;
2. Idolatry, including such things as shaatnez (not to wear garments of mixed wool and linen), which the Rambam attributes to idolatrous practices. Laws in this category are necessary to disseminate certain principles among the population;
3. Morals, which are necessary in order to have a functioning society;
4. Matters involving charity, loans, gifts, valuing things to be dedicated to the Temple, etc. These laws benefit all people, since someone who is wealthy one day has no guarantee of that being the case the next;
5. Damages and acts of violence. The benefit of such laws is self-evident;
6. The penalties for robbery, theft, false witnesses, and other forms of injury. These are necessary to serve as a deterrent to evil people who would otherwise be inclined to commit such crimes. (As many such people as there are now, there would be far more without the threat of punishment);
7. Business dealings – buying, selling, renting, etc. Commerce is necessary in a functioning society, so it is imperative to have a standard of what constitutes equitable behavior;
8. Special occasions, like Shabbos and holidays. Aside from the rest that they provide from our labors, each occasion carries its own message;
9. Ritual law, such as to pray and to recite the Shema. These laws serve to direct our minds towards love of God and our service to Him;
10. The Temple, including its utensils and the kohanim (priests);
11. The sacrifices. The Temple and sacrifices served to wean the people from idolatry to monotheism, as we have discussed (see section 51);
12. Laws of ritual purity and impurity. These laws limit people’s ability to enter the Temple. The limitations on attending the Temple underscore its greatness and cause people to revere it more;
13. Forbidden food and similar prohibitions. These laws serve to curb our desires so that we don’t come to see physical pleasure as the purpose of our existence;
14. Forbidden sexual relations. These laws serve to limit our lusts, so that pursuit of sexual gratification will not become our life’s main endeavor.
Mitzvos are also divided into two types: those between a person and God, and those between a person and his fellow man. Of these fourteen categories, the mitzvos in the fifth, sixth, and seventh, as well as some in the third, concern interactions between human beings. Those in the other categories concern our relationship with God. The latter are intended to improve our collective morality and intellect, leading us to higher states of perfection. While these are mitzvos between man and God, they ultimately lead to improved relations between people, albeit in a more roundabout fashion than mitzvos between a person and his fellow.