Our outward actions are extremely important, but when the Lord looks at those actions, He goes deeper and sees the intent of the heart. Sometimes, the outward actions of two individuals may be exactly the same, but the intent of the heart completely different. One may be honoring God by his actions while someone else doing the very same thing may be sinning. Here’s how Charles Finney explains it further:
A student labors to get wages, to purchase books, to obtain an education, to preach the gospel, to save souls, and to please God. Another labors to get wages, to purchase books, to get an education, to preach the gospel, to secure a salary, and his own ease and popularity. In the first supposition he loves God and souls, and seeks, as his ultimate end, the happiness of souls, and the glory and gratification of God. In the last case supposed, he loves himself supremely and his ultimate end is his own gratification.
Now the . . . immediate objects of pursuit, in these two cases, are precisely alike, while their ultimate ends are entirely opposite. Their first, or nearest, end is to get wages. Their next end is to obtain books; and so we follow them, until we ascertain their ultimate end, before we learn the moral character of what they doing.
The means they are using . . . are the same, but the ultimate ends at which they aim are entirely different, and every moral agent, from a necessary law of his intellect, must, as soon as he understands the ultimate end of each, pronounce the one virtuous, and the other sinful, in his pursuits. One is selfish and the other benevolent.
Finney then later remarks [and these quotes come from his Systematic Theology],
It is undeniable that the vilest sinners do many things outwardly which the law of God requires. Now unless the intention decides the character of these acts, they must be regarded as really virtuous. But when the intention is found to be selfish, then it is ascertained that they are sinful notwithstanding their conformity to the letter of the law of God.
How often I’ve heard someone being praised for some outward action without taking into account the intention of the heart, also known as one’s motive. This is a clear reminder that God will judge the heart, and that, as His people, we need to do our best to make a sober and discerning judgment of intent/motive as well.