Tomorrow is the Boston (MA) Marathon, which attracts over 30,000 runners and many, many spectators. They start in the town of Hopkinton, which certainly does not have much in the way of public toilets. Just think of the logistics of 30,000 runners wanting a wee just before they start the race! Of course gentlemen should allow the ladies first crack at the portapotties.
The race ends in downtown Boston, where there might be more public toilets but fewer places for a discrete outdoor pee for the thousands of spectators.
The key to preparing for these events, where everyone has to hydrate beforehand, is to time your final pee before the race right. It needs to be no more than 15 minutes before the start, otherwise you'll have to go again. I've seen lots of guys in the starting pens having to go back out and losing the advantageous starting place they got for themselves. Once I got it wrong myself and peed discretely into my empty AA drink bottle while standing in the tightly packed masses. Once started, you always pass lots of guys peeing at the side. It's a real issue.