How can I deal with a tough professor?

I will say that although this seems quite fair for the most part, it’s unreasonable to not allow students to ever go to the bathroom. It happens sometimes. If you’ve gotta go, you’ve gotta go. But what I’ve seen in my classes quite often is the same students consistently getting up to go to the bathroom day after day. Sometimes even multiple times. It’s definitely possible that some of them have medical conditions causing it, but I’m sure it’s not the case for all of them.