For mammals and many higher-order of animals, pleasure/joy encourages a behavior, pain/unpleasantness discourages a behavior. Certainly there is an instinctive component as well.
There is no doubt in my mind male dogs derive pleasure from sexual intercourse and can experience something *they* would consider an orgasm if they could intellectualize and verbalize it in a way we would understand.
However, it's in the body language, the nuances of the experience, and sometimes even expressed in a vocal way.
One of the most obvious was a standard poodle I was with somewhat regularly (I was dating his owner) who would often would let out a loud, ongoing Howwwwooooooooooooooooooooooo right as his first of several bursts of semen came to be. During and after ejaculation his penis and knot would twitch-twitch-twitch and his hips seemed to do the same. At the same time he'd literally squeeze my waist with his legs, holding on tight, panting hard.
Yeah, he orgasmed.
And there was no denying he wanted to have sex. He made that really clear. If we did the deed, then his "I want" behavior would stop for a long time, then he'd start it up again.