Dehydration can affect the entire body, even when someone is only slightly dehydrated. Failing to get enough fluids stresses the immune system, making it harder to attack bacteria in the body. Staying well-hydrated also helps flush out bacteria that multiply in the urinary tract.
The bladder is the part of the urinary system that acts as a collection container for urine until individuals use the restroom. When bacteria enter the bladder through the urethra, they are essentially sitting there and waiting until the individual urinates. This is the ideal place for bacteria to multiply and infect the bladder walls. When individuals pee, they aren't just flushing out urine. In fact, they are also flushing out bacteria in the bladder. Dehydration can suppress the immune system and allow the bacteria more time to multiply in the bladder until it causes an infection.