(1) God has bound himself to his sacrements. God acts in the sacrements.
(2) Gas is not bound by his sacrements. Can he save you without baptism? Yes. So God can forgive without confession.
But sin is saying "God, I know what you want, but I don't care : I want what I want." So "God I know what you want, you created confession, but I want it my way" is kind of akward isn't it ?
Going further: how is forgiveness even possible? Mercy being even better than justice is a christian novelty. Jesus made it good, and possible, and even real.
He gives this power to his Apostles (first bishops). Jn 20,23. Day 1 of Resurrection! Jesus gave it so we could use it. He asks us to do it that way.
Mercy is the gift we deserve the least and need the most.