Secularists often point out that Christians conveniently ignore selective parts of the Law of Moses. For example, the book of Leviticus prohibits eating shellfish. [An aside: the belief that Leviticus also prohibits shaving is wrong; it does not.] What does Jesus himself say about the law of Moses?
Don’t think that I have come to destroy the law [of Moses], or [the teachings of] the prophets: I have not come to destroy, but to fulfil them. Until heaven and earth pass away, not a letter or even an accent shall change in the law [of Moses], until all is fulfilled.
Whosoever breaks even one of the least commandments [like the injunction against eating shellfish], and teaches other men to do so, shall be called the least in the kingdom of heaven, but whoever follows and teaches them shall be called great in the kingdom of heaven.
Note that one who breaks minor commandments, and even teaches others to do so, can still achieve the kingdom of heaven. Following the law of Moses to the letter is not essential, but it is helpful.
Unless your righteousness exceeds the righteousness of the [temple] scribes and [those who attempt to follow the law of Moses to the letter], you shall not enter the kingdom of heaven.
Righteousness (or acting in accord with moral law) is the essential element. Following the law of Moses is one way to achieve righteousness. Jesus goes on to clarify that following the law of Moses alone is not sufficient:
The law of Moses says: “You shall not kill.” But I say that anyone who is angry with his brother without cause is in danger of judgement, whoever calls his brother worthless is in danger of the tribunal, and whoever says “you fool” is in danger of hell fire. Therefore, if you want to ask something of God, but remember that your brother has something against you, first go and be reconciled with your brother, and then say your prayer.
The law of Moses says: “You shall not commit adultery.” But I say that anyone who lusts after a woman has committed adultery with her already in his heart. If your right eye offends you, pluck it out, and cast it from you; it is better for you that one of your members should die, than that you should be cast into hell.
The law of Moses says: “Whoever wants to leave his wife must give her a divorce.” But I say that whoever leaves his wife, unless she herself is an adulteress, causes her to commit adultery, and anyone that marries a woman who is divorced commits adultery.”
Jesus believed that merely following the laws of Moses does not make you a good person. If you observe the law, but there is evil in your heart, you are not worthy to enter the kingdom of heaven. His approach to the law is full of common sense. When confronted for breaking the sabbath, one of the ten major commandments, he said:
If any of you had a sheep and it fell into a pit on the Sabbath, wouldn’t you take hold of it and lift it out?
The commandments where written to guide the common people of the time, to help them to live righteously. The Sabbath was a way of making sure people took time to be spiritual and contemplate their souls. Jesus knew that following the rules was not sufficient on its own. One who is truly ready to enter the kingdom will know when it is right to ignore the laws, as in the case of healing someone on the Sabbath.