For me, I just have a weak bladder. I think it also stems from anxiety. Whenever I go out to see a movie for example, I always have to go in the middle of the movie. If I were home, I'd chill through it fine, but I think when you're away, you get this anxiety that just makes you want to go faster, idk.
I don't have a problem using the bathroom with others around, but I can understand why someone would.