Actually, it's very simple: Your snake doesn't move around so much when he's in his vivarium, but when you handle him, the greater amount of motion, plus the pressure YOU are putting on his body in the natural course of handling him are just naturally pushing the waste toward the "exit".Get it? It's like taking your dog for a walk, the motion sets the waste in motion too.
In his home, he'll eventually expel wastes, it's just taking longer- but when you come along & handle him at the right time, you're causing the "inspiration", lol. So from now on, PLAN for this. And if you look at his tail when you pick him up- if it's a little puffy just above his cloaca, that's a clue that he'll need to go pretty soon, & that you'll want to pay attention to where you handle him. It's up to you, after all. But you can't expect him to hold it with all your handling & the extra motion.
It's normal for a snake to be a little spooked when you touch their tail...or their neck/head, for that matter. Those are places that predators tend to grab & he's still learning about you.Snakes all rely on their instincts to survive, & the only thing that normally picks up a snake in the wild is a predator that's about to eat them! So yes, handling might be adding a little anxiety- just be patient & considerate.