In all four accounts, somebody objects to her actions. In Mark, we are told that "some were there who said to one another in anger . . ." (Mk. 14:4). In John, Judas is the one who complains (Jn. 12:4). In Matthew it is the disciples who angrily protest her action (Mt. 26:8). In Luke, his host the Pharisee objects, not on the grounds of extravagance but of morality, that Jesus would allow himself to be touched by a "sinner" (Lk. 7:39).
Only John explicitly states that the argument for "concern for the poor" is bogus. Jesus has offered his disciples the opportunity to give to the poor any time they choose, and to give loyalty to him right now. Mark and Matthew include Jesus' words, "The poor you will have always with you, but you will not always have me." Matthew and Mark connect this story with Jesus' passion. The early church may have wanted to include an anointing of Jesus' body, since no proper anointing was possible after his death (Mk. 16:11). In Mark and Matthew the passage ends with the theme of universal proclamation of the gospel to the Gentile Church by this unnamed woman.
There was a time when the fact that this woman with the oil was unnamed was all I could see about this passage. The apparent unfairness of nameless fame was foremost in my mind. Over time, I have come to view it as an opportunity to see myself in her. In Mark she commits an act of kindness in a context of cruelty. She honors Jesus with an extravagant outpouring of herself that fills a room with sweet fragrance. Her action is an oasis of honor in a desert of plotting and brutality. While Judas looked for an opportunity to betray Jesus, she made an opportunity to honor him. Despite all the hostile power arrayed against Jesus, she manages to find a way to anoint him with a soothing, fragrant ointment. She doesn't ask for fame, just for you and me to do the same.