Store your treasures in heaven, where moths and rust cannot destroy, and thieves do not break in and steal.
A few verses prior, hypocritical fasting is mentioned. God knows what we do in private and He honors and rewards that. If your motivation for doing something good hinges on how others will perceive it, as mentioned in the prior verses, that’s all you’ll get. As our hearts change and are molded by the Almighty, doing good should become second nature, not an empty display that will get us brownie points from our peers.