St. Luke has run together two legal observances that Mary and Joseph fulfilled.
According to Exodus 13, every first-born male belonged to God. God delights to create human life, and does not want human sacrifice, so a human child had to be 'ransomed' - his life was 'bought' from God. The 'price' was due on the thirtieth day after birth, and did not require attendance at the Temple.
Leviticus 12 prescribes a purification sacrifice in the Temple forty days after birth (eighty days for a girl). This does not imply there is something 'wrong' with giving birth. Giving birth is wondrous; burying the dead a sacred duty - but some time after these 'awe-some occasions' a ritual marked the transition back to 'ordinary time', rather as Jews wash their hands after touching the Bible, even though the Bible is not 'dirty'! Nevertheless, purification sacrifices were also part of the process for undoing sins and so spoke of the need for forgiveness.
So Jesus is brought to the Temple on the fortieth day, and welcomed by Simeon and Anna, two elderly people who sum up the long ages of hope sustained by prophecy. They stand for those many people to whom the Holy Spirit spoke God's promises, either in the depths of their hearts, or in the words of prophecy and in the rituals of the Law. All that grace - like the grace of Mary's immaculate conception - was of course given in view of what the Christ would do and suffer.
Hope had been mingled with fear. The Lord would come to His Temple - but who could endure the day of His coming? His presence would burn away the impurities that weigh down on our service of God.
The Lord comes to His Temple - as a Child, graciously willing to be carried in His creatures' arms. He dispels fear by His gentle 'homeliness'. He deepens our 'fear', for we recognise that this is both the Lord's Anointed - and the Light that enlightens everyone, the Creator whom the highest heavens cannot contain. This is Jesus, Yeho-Shua, the Lord whose presence is salvation. This is the Eternal Wisdom, who is God's beloved Child (Proverbs 8:30), who makes all things new and without whom the world would grow old and decay.
In the Holy Spirit, Simeon points to the unexpected - even ironic - way in which Jesus will vindicate the hope of Israel and invite all nations to welcome the promise. Even Mary and Joseph must marvel. Jesus, the penetrating Word, will show up the depth of human sin by being contradicted by His creatures. The source of their life will let them kill Him. Mary's First-Born, who was 'ransomed', shall make Himself a ransom for the many. At the cost of His human life, which He shall lay down for His friends and take up again, Jesus shall set us free from slavery and make us God's beloved children who share His divine life.
By handing Himself over into His enemies' hands, Jesus shall make Himself the sacrifice that truly has the power to undo our sins and turn us into God's friends. The sacrifice Jesus was to offer on the Cross was to mark the transition into a new age: we can follow Jesus the High Priest into the very presence of God and into the resurrection world.
The Church's liturgy for today incorporates a procession that was celebrated at this time of year in pagan Rome - a procession with lights for the purification of sins. For the Holy Spirit had awakened quite widely a sense of the need for forgiveness. The candles we carry to the Church recall Mary carrying Jesus the Light to the Temple, and call us with her to follow Him, our Brother and Leader, into the divine glory we glimpse in our Liturgy. A candle gives light by expending itself, reminding us of how Jesus sacrificed Himself to 'purchase' the world. In some liturgical traditions, such as the Dominican, the people offer their candles after the Gospel.
Our Liturgy continues with the consecration of the Holy Eucharist. Once again, the Creator is willing to be carried in His creatures' hands. In His presence we, like Anna, give thanks to God. We are drawn into that absolutely pure sacrifice at which Mary's soul was pierced. No wonder, then, that in certain mediaeval rites, the priest would recite Simeon's song when leaving the Altar after Mass: Mine eyes have seen Thy Salvation.