Allegedly, for the Mac mouse the reason is so that people can't use it permanently plugged in, because cables are ugly and against "the Apple philosophy".
My cordless beard trimmer doesn’t run when plugged in, so you have to wait for it to charge before using it. When getting ready in the morning, you can’t sit around for an hour waiting for it to charge enough to function.
I mean from an EE perspective it makes some sense, because you save some on circuitry (not like a lot in absolute cost, but your cordless beard trimmer probably doesn't have a lot of margin).
So the real reason is probably just to make it cheaper. (Well maybe not in the Mac case)
Supposedly it's by design. The justification being something along the lines of "you're doing it wrong" if you have to drag the cable around while mousing.