Like it or not, you’re a human. Unless you’re a robot reading this, then in that case, stop reading this! This is for humans only! And being a human comes with some delightful amenities. One of those is having to use the restroom every once in a while. And by every once in a while, I mean a bunch of times a day. And the laws of space-time make it so we never stop being human, even if we’re at our place of work. As much as they might like us to be automatons who have no needs outside of work (a la Severance), we are not. Heck, on Severance, the innies still had to use the bathroom every once in a while.
And you can’t help it when you need to go. It’s not an urge you can readily ignore, unless you’re willing to face the consequences. And bosses should know this. They should know that you need a bathroom break when you need a bathroom break and that you shouldn’t stand in their way. But not all of them understand that.