God is able to see our real motives. Nothing is hidden from Him. It's in the Bible, Jeremiah 17:9-10, TLB. "The heart is the most deceitful thing there is, and desperately wicked. No one can really know how bad it is! Only the Lord knows! He searches all hearts and examines deepest motives so He can give to each person his right reward, according to his deeds—how he has lived."
Correct motives are needed for answered prayer. It's in the Bible, James 4:3, NIV. "When you ask, you do not receive, because you ask with wrong motives, that you may spend what you get on your pleasures."