I see many focusing on forgiveness. That is not the primary effect of, nor reason for anointing.
The effects are stengthening, peace and courage. It is for uniting the sick person’s suffering with the passion of Christ for the redemption of the entire Body of Christ and grace for the whole Church.
Anointing also completes what Baptism began - conforming us to the death and ressurection of Christ. Baptism anoints us into the life of Christ. Confirmation anoints us into the strength of Christ. Anointing of the Sick anoints us into the death and ressurecation of Christ. They each part of a unified whole which is part of the Christian life.
This is all covered in the Catechism. Reference
vatican.va/archive/ccc_css/archive/catechism/p2s2c2a5.htm.
Forgiveness of sins is only part of it. It’s not about sin as much as it is about conforming one’s life to Christ’s life. We all need forgiveness, yes, but that’s not all of what Confirmation and Anointing of the sick is about. It’s about partaking in the divine nature (cf 2 Peter 1)
Heck, confession isn’t even primarily about forgiveness. Confession is a sacrament of
healing. If you look in the catechism, there are two categories of sacraments; sacraments of initiation and sacraments of healing. God wants to heal you of your sins so that you don’t do them any more, not just forgive you and have you come back again and again. The Holy Spirit is the doctor of our souls and Jesus was a healer. God doesn’t want to just forgive us. We all need forgiveness but God wants to heal you, strengthen you, and make you more like Christ.
-Tim-