heidi1234 is right. You don't need to have anal sex to contract anal hpv. In fact, std specialist H. Hunter Handsfield here on medhelp stated that if you've got hpv then you've also got it in the anal area.
Anal sex is NOT necessary for hpv transmission to the anus. Just think about sex positions and if one has hpv it is most probable that it is infected everywhere down there. High risk hpv is 99% symptomless and invisible that is why most people have it or have had it(active) in their lifetime and never know. The body never gets rid of it; the immune system suppresses it in most people. I have hpv and I have never had anal sex and I have had only ONE Faithful sex partner for my entire life of over 50 years. My daughter got the vaccine.
I will also add the vaginal sex is more risky for women because cervical cancer is more common and totally attributable to HPV.
WRT cancer caused by HPV, Penetrative anal and vaginal sex is not risky for a man. Receptive anal sex is a small risk.
It isn't a really common form of cancer. Rates might increase as anal sex participation increases, but hopefully detection and prevention abilities will improve.
There is a risk associated with all choices and activities, and personally, I don't feel this risk is all that high.