“Mary therefore took a pound of expensive ointment made from pure nard, and anointed the feet of Jesus and wiped his feet with her hair. The house was filled with the fragrance of the perfume” (v3). Jesus didn’t condemn Mary for her extravagant gesture of love; he affirmed her, even when Judas objected (v7-8). Jesus saw beyond proper religious actions and was concerned with motivation. Judas was motivated by greed, while Mary was motivated by love (v6).
“Leave her alone …” (v7). God isn’t impressed by correct words or membership in the right group; He wants the devotion of our hearts.