Ok, this is going to seem a little gross, but it's the truth. The male's penis swells so as it gives his sperm time to fertilize the female's eggs. This makes it hard for other males to come behind him and impregnate her. They usually do not stay stuck for long, but I have seen dogs stuck for 1 hour before.