“How could anal sex cause pregnancy?”
You can only get pregnant if semen gets inside the vagina. Since the anus isn’t connected to reproductive organs, anal sex can’t directly cause pregnancy. But it’s still possible for semen to get into the vagina during anal sex. It can happen if the guy ejaculates into or near the anus, and the semen leaks from there down onto the vulva. Semen on hands or fingers could also put it closer to the vulva, also.
Wearing a condom during anal sex can reduce your risk. And don’t forget: Anal sex is also a high-risk behavior for spreading many STIs.
“Can sperm still affect a girl if it was through anal?”
Anal intercourse will not result in pregnancy but can result in exposure to a sexually transmitted infection. Also, couples having anal sex should remember to use a different condom if they have vaginal sex or to have the male wash his penis before entering the vagina to prevent the woman from getting a vaginal infection.