Being infected with human papillomavirus, or HPV, is the most important risk factor for anal cancer. Most cases of anal cancer are linked to HPV. HPV is a virus that can cause abnormal tissue growth and other changes to cells.