What are the causes of perianal abscess?

Anything. That cause inflammation in the rectum, such as diarrhea, constipation, or trauma can cause swelling and blockage of the anal ducts which then get infected and seek the path of least resistance to form a perianal abscess and possible fistula.
Perianal abscess. Bacteria can cause abscesses around the anus by entering the area through the skin or through the anal wall due to irritation or trauma. Underlying gastrointestinal diseases such as crohn's disease can be associated with perianal disease.