"Then Jesus said to the crowds and to his disciples: 2 The teachers of the law and the Pharisees sit in Moses seat. 3 So you must be careful to do everything they tell you. But do not do what they do, for they do not practice what they preach."
Read the rest of the chapter. Not once does he say anything against the Law of God. He attacks them instead for their pride, their hypocrisy and for placing heavy burdens upon the people through the numerous traditions of the elders. It is not God's law that is burdensome (see Deut 30:11-14, 1 John 5:3), but rather the vast network of man-made traditions which Yeshua/Jesus considered burdensome.
And of course the leaders hated him for this. He revealed their pride and hypocrisy to the people.