Anointing with perfume
By God’s command
In the original: νάρδος nardos (“nard”)
Anointing a guest's head with perfumed olive oil was a common courtesy of hospitality and honor —so usual that omitting it was discourteous (Lk 7:46). What Mary did was extraordinary, not an everyday custom: she poured pure nard, a very costly imported perfume (nearly a year's wages), over Jesus' feet and wiped them with her hair. Such a lavish, intimate act was reserved for the deepest honor or devotion.
Where it comes from
Anointing with oil as a sign of honor, gladness, and welcome is ancient throughout the region (cf. Ps 23:5). Fine perfumes like nard were luxury imports, so an everyday courtesy could become an extravagant gesture.