Thats an interesting question you pose, and I hope I can offer my suggestions. Not being there I cant state for sure, but here are some possibilities. The anus and rectum is full of nerve endings, and for some, anal sex is very enjoyable because of the many nerve endings that are stimulated by that activity. People can orgasm from that. Its possible that as you have a bowel movement, your own nerves in the rectum are being stimulated. Its also possible that as you have a bowel movement, tissue in your perineum is moved or displaced by the stool...resulting in some interesting sensations.
I hope I was able to help....