Jesus was chastising the clerical in this case (if you read further concerning the audience he was "entertaining").
If one would continue to read further, Christ is specific about the "laws" we are to follow: Love ones God with all thine heart, might and mind...and Love neighbor as thine...