Picture a bowl of fruit in your kitchen, filled with apples or oranges or whatever you like. Picture the plant that grew the fruit, and yourself next to the plant. Now imagine the growing season, and you are trying to make the fruit grow big and sweet. You have a clear idea of what size the fruit should be, and how it should taste. Imagine trying to make the fruit grow bigger by measuring its shortcomings in comparison to better fruit, and treating the fruit directly in the hopes of growing bigger, tastier, more plentiful fruit.
Except it doesn't work that way. You can't cheerlead the fruit and expect that to make them grow. You can't guilt-trip the tree and expect that to work either. You have to have healthy roots, and healthy pruning, and all the things that go into a healthy plant. When that is done, the fruit takes care of itself with time.
So how exactly does focusing on good works create hypocrisy? If someone focuses on results but ignores the factors that matter -- the basic underlying health -- then good results won't happen, except by luck or accident. But when it comes to morality, good works are disturbingly easy to counterfeit. Sometimes there is a temptation to lower the bar, and rather than asking for love as Jesus asks us, instead we may be asked for some set of works that is attainable without love -- like not drinking, or praying a certain number of times a day, or not playing cards. We may be glad for the approval we obtain by fulfilling those requirements, glad to have the satisfaction that we achieve, and we may not ask whether it was a good thing to set our sights on a set of works that is attainable without love. I would compare those works to a bowl full of plastic fruit. We may even get a bumper crop of plastic fruit. Anyone who is measuring by appearance will be completely satisfied with a bowl of plastic fruit. It sure looks good, but the appearance without the substance is the heart of hypocrisy.
How does religion keep falling into the trap to become "rules taught by men"? How often has that pattern repeated itself? We fall into that temptation to demand a set of works we can attain without love. Jesus told the hypocrites of his day that they strained at gnats and swallowed camels. They even tithed from their little herb gardens, every tenth sprig of mint. That's devotion to the letter of the law. That desire for a set of rules we can follow without love, without any thought to justice and mercy: that's the camel.