Just as with the gold and sacrifices of the Temple, the commandments don't exist for their own sake. They were given for our benefit, to teach us how to love and to worship. If keeping a commandment doesn't lead you to greater love of God and mankind, then you're not keeping the commandment. Rigid adherence to aspects of God's Law that can be easily seen by men to the detriment of those that cannot be seen by anyone but God is worthless.
Matthew 23