Jesus knew his thoughts

Later on, Jesus was invited to the house of one of the Pharisees. As He was sitting there Mary came and anointed Him with very expensive oil she had purchased in love for her Redeemer. She came to Him weeping, washing His feet with her tears and drying them with her lose hanging hair, and she kissed His feet. Then she anointed Him with the oil. The Pharisee who invited Jesus saw what was going on and he thought by himself that surely Jesus could not be from God, since He welcomed this woman. But Jesus knew his thoughts and told him a parable about how the one who has been forgiven the most will love the most.
Mary had really experienced Jesus love and compassion; she had been forgiven for many sins and because of this she loved Jesus so much more. It is when we experience Jesus’ compassion that we will begin to love Him back and have compassion for other people. Ellen White puts it this way, “He who loves Christ the most will do the greatest amount of good.” DA 250.