Pretty much what the other anon said. The entire intestine produces mucus to lubricate the way for stuff to move along without causing too much friction. The amount produced by people seems to vary, but there is an element of positive feedback. If you touch/rub the lining of the rectum or colon, it will interpret this as irritation and produce more mucus to compensate.
Personally, I produce a LOT of this stuff. In fact, I fingered myself and shoved objects into myself and even had anal sex many times with nothing but saliva and this natural lubrication up until I was about 25 and bought my first dildo and it came with a sample of actual lube. I always had to use a towel when getting fucked by my ex because the stuff would literally drip out of me and make a puddle on the bed.
Nowadays I usually use a tiny bit of lube just to get things started because it's more comfortable, but I never really have to.