How come dogs will swim for hours and waller in mud puddles, but they do not want to go out to pee when it’s raining?

I stand on the porch yelling like a fish wife and pointing a finger. “You’re not coming back in till I see a pee and a poop! I do not have a video of this.