ANSWER: The Bible verses in question regarding this foot washing are found in the book of John, chapter 12. Let us look at the first few verses of this chapter to see what we can glean from them in order to answer your question. The first verse of John 12 tells us that less than a week before Jesus' final Passover with his disciples he travels to the Bethany home of Mary, Martha and Lazarus.
As a detailed timeline of the last days of Jesus shows, he came to Bethany (which is roughly one to two miles from Jerusalem) near sunset on a Wednesday. The actual dated was March 29th, 30 A.D. He will be betrayed and arrested after sunset on the coming Tuesday, which is April 4th. His crucifixion will occur the next day, April 5th.
Verse 2 of the chapter states that Martha made Jesus dinner. Martha was always busy and active. She would throw herself so totally into serving that she sometimes missed that something still more important needed her attention (Luke 10:38 - 42).
3 Then Mary (Martha's sister) took a whole pint (other translations say a pound) of a very expensive perfume made of pure nard, poured it on Jesus’ feet, and wiped them with her hair . . .
Spikenard is a precious and expensive rose-red colored oil made from the highly aromatic dried roots and oily stems of the spikenard plant. The plant grows in India. Roughly speaking, this ointment cost the equivalent of $50 U.S., which in the first century A.D. was the average wages of a worker for almost an entire year.
Verses 4 to 6 tell us that Judas (who would betray Christ) complained loudly to Jesus that instead of buying the spikenard, Mary should have used the money to give to the poor. While seemingly noble on the surface, Judas was feigning his concern for Israel's poor. Since he was a thief (verse 6) who controlled the group's "money bag" (which was likely used to help the poor) he wanted the oil turned BACK into cash so that he could steal it from the bag.
Jesus answers Judas' petty complaint by telling him to leave Mary alone (verses 7 - 8)! He also states that what she did was a very good thing.
Notice that Martha (John 12:2) served or "ministered" to Christ's physical needs on this first of three recorded meals that He attended during the same week. Her serving was honorable and commendable. So, what was the significance of Mary washing the feet of Jesus with her hair? She was more "spiritually perceptive" than her sister, Martha. She was also more interested in what Jesus had to say and made it her practice to sit at His feet so she could hear every word He spoke in her presence (see Luke 10:38 - 42).
By acquiring expensive spikenard, anointing His feet, and wiping them with her hair, Mary displayed a devoted and affectionate humility to one she loved deeply and sincerely. Her actions are intentionally in the Bible to memorialize, for all ages, what she did. Interestingly, Jesus, in less than a week, would wrap a towel around his waist and wash the feet of ALL his disciples, including Judas who would betray him, on Passover night. Our Heavenly Father places a high premium on humility and love, which are both critical in the character of a true Christian.