As far as I know, the Pope did not commit the sexual offense. Why is he begging for forgiveness and from whom?
Basic prayer inclusive to all mankind we ask God for forgiveness on behalf of all too.
12‘And forgive us our debts, as we also have forgiven our debtors.
Like if someone punches you, that would still be an offense to me, I still do suffer for it would probably make me furious.
Likewise I still would have a concern over the attacker's succumbing to cowardice acting on evil, I have to examine myself if could have set a better example.
With God on your side your responsibility has a limitless capacity.
Other examples is like Moses on behalf of his people, Jesus and Stephen pleading forgiveness on behalf of those killing them.