What males in nature strive for is to ensure that their own genes can spread and prevent others from spreading their genes.
Therefore, all bisexual animals will try to solve this problem. For example, the penis of some beetles is directly a spoon to scoop other people's sperm. Some insects spit mucus to block the vagina after mating.
The way dogs mate is after ejaculation, a male dog whose penis is swollen and locked by the bitch's vagina for at least half an hour, so as to maximize the retention and fertilization time of his sperm in the bitch, and prevent the bitch from mating with other male dogs immediately, so that his sperm cannot be fertilized by the bitch.
Usually in the pre-ejaculation stage, the male dog rides on the back of the female dog in the same direction. Male dogs in after ejaculation will turn around and stand (it is estimated that riding on others for half an hour is too tired). At this time, two dogs can't be separated because their penises are locked. So it's butt to butt.