CCC 2057 The Decalogue must first be understood in the context of the Exodus, God’s great liberating event at the center of the Old Covenant. Whether formulated as negative commandments, prohibitions, or as positive precepts such as: “Honor your father and mother,” the “ten words” point out the conditions of a life freed from the slavery of sin. The Decalogue is a path of life:
If you love the LORD your God, by walking in his ways, and by keeping his commandments and his statutes and his ordinances, then you shall live and multiply.1
This liberating power of the Decalogue appears, for example, in the commandment about the sabbath rest, directed also to foreigners and slaves:
You shall remember that you were a servant in the land of Egypt, and the LORD your God brought you out thence with a mighty hand and an outstretched arm.2

1 Deut 30:16.
2 Deut 5:15.