Forgetting the spread of HIV from partner to partner for a second. The Pope is ignoring the fact that a huge amount of babies are born with HIV. If those babies live until marriaging age and remain abstinent all that time, they will still spread the disease to their partners and still bear infected children once they have gotten married.
Condoms are the only thing that will stop babies being born with HIV because it will reduce the amount of pregnancies.