The Holy Ghost does not choose the Pope, the College of Cardinals do. They pray for His guidance, whether their prayers are answered or not is another matter. There have been some terrible popes throughout the history of the Church.