Since poop is full of e. Coli, aren't those people who do anal sex getting themselves infected with e. Coli?

Good question. Men are fortunate to have a long urethra so bacteria from partners anus are unlikely to reach the bladder or prostate. Bacteria are also flushed out with urination after sex. However distal urethritis is more common after anal sex than after vaginal or oral sex.