Your body, and more specifically, your kidneys, sense and adjust the composition of your bodily fluids and dump the excess into the urine. Stuff you can’t live without in many cases – things like potassium and sodium and water. It actually has lots of good stuff in it. So when something happens to stem the flow of pee, trouble ensues - and fast.
Eating, you can hold off for a few days, pooping is optional (for a while anyway), but peeing is right up there with breathing on the list of things you just gotta do each and every day. It's a natural fact that every mammal has to pee.