It sounds shady but yeah...you can get pregnant while having anal sex only. There are 3 ways I can think of...2 of which are mad rare and 1 would be due to straight up dumbassery.
1. As someone posted above...you can have a malformation of your vagina so that your anal and vaginal passages merge into one tube.
This shit is super rare though...and most people fucking that 2-in-1 hole wouldnt necessarily think it's an asshole and feel they're having anal sex.
2. Women can have / developed something called a rectovaginal fistula which is a hole in their vagina that connects to the anal passage. The hole can be microscopic or up to the size of a dime. You skeet in that ass and there's a possibility of your boyz finding their way to her cervix.
3. Sex can get messy....you blow a fat load in your girl's ass and she's face up, ass down that cum is gonna trickle out, down her crack into her pussy. An Oops Baby can result.