When you gotta go, you gotta go. It doesn't matter what you might be doing or who might be shooting at you for doing it. This, of course, includes the military personnel who get put in a lot of situations that would test anyone's nerves. And bladders.
There are the times when having to go came in handy. There were times when it was absolutely necessary. There were times when there was no other way. They answered the call of duty while answering the call of nature.
1. Cooling down a Vicker's machine gun.
During WWI, British-made Vicker's machine guns needed a waterjacket to keep the weapon cool as it fired hundreds of rounds of flaming death at oncoming enemy troops who fail to understand the meaning of "No Man's Land."
As long as you kept the barrel cool by replacing the water jackets when they heated, the guns would shoot for hours and hours, totally reliably. But if troops didn't have a cool water handy to replenish the water, they would instead pee into the gun's waterjacket. One gunner said it "made the war a bit more personal."
2. Hosing down an aircraft fire.
Being in a bomber over Europe was incredibly dangerous in World War II. It doesn't matter what job you're doing in the crew. American bomber crews had a 40% chance of making their sortie quota. The 8th Air Force alone lost 26,000 men. If you want to know how crazy that is, the Marine Corps total killed for all of WWII is around 19,000.
One of the guys who made it back to England was Airman Maynard "Snuffy" Smith, a gunner over St. Nazaire, France – a place called "Flak City." It was here Snuffy's plane was torn to shreds by fighters. The fuel tanks started pouring gas into the plane, which of course caught fire. As Snuffy fired his guns at oncoming Nazi fighters, he forcefully pissed the fires out, tended to his crewmates' wounds, and chucked the flammable items out the window.
Six more men made it back to England with Snuffy, who was awarded the Medal of Honor. The plane broke in half upon landing, though.
3. Forcing NASA to answer the pressing questions.
In 1961, NASA was still testing the things they would have to be prepared for during space missions – namely, answering President Kennedy's challenge to put a man on the moon within ten years. Anyone who's ever been on a long road trip can probably guess what one of the first issues they encountered was.
Even though it meant short-circuiting the equipment designed to measure his vital signs, Alan Shepard did as instructed by NASA and went in the suit. For better or for worse. His colleagues couldn't believe Houston told him to do it. (If you're wondering, Buzz Aldrin was the first to pee on the moon).
4. General Relief.
It would take a psychologist of some specialty to detail what is about peeing on your enemy's territory and fortifications that makes world leaders and generals want to do it. In fact, it's the first thing they think of. When Winston Churchill visited Hitler's Siegfried Line in 1945, he wore a "grin of intense satisfaction."
Churchill wasn't the only one having a Victory Whiz in Western Europe. General George S. Patton peed in the River Seine as he crossed it, and because he famously announced that he would pee in the Rhine, he made sure someone was there to take a photo.
5. The wind pisses back.
In 1950, American troops under Gen. Douglas MacArthur led a complete rout of North Korean forces. After almost pushing the Americans and South Koreans into the sea at Pusan, the entire Communist force fell apart after the Inchon Landing. They were driven all the way to the Chinese border at the Yalu River.
President Truman ordered that only South Korean troops be allowed in the Yalu zone, to keep from provoking China. As every military history buff knows, that's not what happened. MacArthur pushed Gen. Edward Almond's X Corps to the Yalu as fast as possible. When he got there, he took the ritual pee in the river.
Unfortunately, his race to the river dispersed his forces and allowed the sneak attack by the Chinese (who weren't thrilled with the pee in their river) to succeed.