She is probably not picking up on his signals to go out. He knows better than to pee on the floor so he gets up on something elevated and then pees. Or it is possible he has a UTI or some other issue. It may hurt when he pees so he is trying new places to find somewhere it doesn't hurt. (A very common reason for cats who suddenly refuse to use the litter box but it can happen with dogs too.)