There is this delightful anecdote of former World Champion Jenson Button, who did a one-race stand-in for Fernando Alonso. After the race Alonso thanked him via Radio for bringing his car back in one piece and Button proceeded to radio back that he just peed on his seat.
The urination system is similar for technical divers, and its viewed as part of the safety system. Trying to hold it in adds stress which in turn could lead to very deadly mistakes.
If you ever see a diver with a drysuit, look towards one of the legs. If there is a plastic nob there then it is likely the pee valve.
The need for hydration is no joke. At a hotter circuit like Qatar or Singapore, temperatures in the cockpit can reach 50C (120F). The drivers are working incredibly hard physically, while wearing several layers of fire-retardant clothing. Heat exhaustion is a very serious risk.
I'm not sure which train of thought to subscribe to:
A) We make fun of gamers who loo into bottles in their gaming chairs, so we should make fun of these race car drivers who loo into bottles in their racing chairs.
I think there's a reasonable C) which acknowledges that there are multiple jobs where people have an important reason to just have to pee on the spot, and also ridicule gamers for implying that their game is comparable to that.
There's a minor storyline in an episode of 'For All Mankind' where a NASA engineer urinates on himself in the flight control center so as to not leave his post while astronaut lives were in danger. Always wondered if it was inspired by an actual incident during the Apollo era.