Two friends came to town together.
"Let's go listen to a reading of Holy Scripture!" said one.
"I think I'll go to a whorehouse!" said the other.
The man who went to the reading was bored; he wished he had gone to the whorehouse.
The man who went to the whorehouse felt ashamed; he wished he had gone to the reading.
The Angel of Death came for them both at that moment: he took the man in the whorehouse to heaven, and the other man to hell.
That is because God looks both at your deeds, and also your heart.
Inspired by: Tales and Parables of Sri Ramakrishna
Notes: This is story 25 in the book. The version by Ramakrishna mentions specifically a reading of the Bhagavata Purana.