Similarly, if you were attending a public institution, it makes sense that if you're seeking special accommodation then you'd at least have to disclose how you want to be accommodated. It does not mean you have to disclose you have IBS.
What we might debate is whether 2 months is a reasonable timeframe to ask for a doctor to write a note, or whether 6 bathroom trips a day should be the threshold that a warehouse should care about.