My Bose headphones also aren't usable while charging. Very frustrating. I don't care if there are technical reasons. It's just bad UX.
It makes no sense.
So the real reason is probably just to make it cheaper. (Well maybe not in the Mac case)
For a mouse this is all irrelevant because it uses so little power that it can easily be powered by a regular USB.
Also, many bathrooms don't have sockets anyway. At least not nearby (and cooper is expensive too these days)
Having them non operational when charging can very well be a safety measure so that they don't use it while plugged in.
There's really no excuse for headsets like Bose where such circuitry is a rounding error in the hefty price tag.
Hell, they even have USB circuitry that enumerates as an actual device on the bus but couldn't be arsed to have it be a proper audio class device.