Popes aren’t chosen by God tho…they are elected by the Papal Conclave which is a gathering of Cardinals. Generally elected from Cardinals, Bishops or other Priests deemed worthy but technically even a layman could be elected.
These people receive a calling from God and choose to serve in His ministry. Catholicism speaks a lot about Free Will. Just because you receive the calling does not mean you have to undertake it. If the current Pope feels he cannot serve God to his utmost potential for health or any other reason it makes sense for him to resign and let someone who is better fit to serve and lead.