Mary wouldn't be able to keep the priests from falsely accusing Jesus, the crowds from mocking Him, the soldiers from crucifying Himbut she could pour oil upon Him in an act of worshipful acknowledgment that He had come to die. And in so doing, Mary did what she could.
You might not be able to speak to large groups of people. You might be unable to preach, lead worship, or sing. But can you bake some bread for someone in need? Can you make a hospital visit? Can you mow a lawn? Too often I focus on what I can't do instead of seeing what I can do. Mary did what she could. And Jesus commends her.
Jesus told His disciples directly that He was going to die, be buried, and resurrect from the dead. But they didn't understand. Yet because she sat at Jesus' feet, Mary was able to understand that which the disciples missed.