This isn’t too hard to explain based on everything I know about human behaviour. Your brain has probably just carved a very big pathway in it for all the times you’ve pooped in your own home. You can associate anything that rewards your body with endorphins with anything else that provides a strong memory or reaction. See pavlov