My female dog has been spayed. My grandchildren's male dog has been neutered. Before he was neutered, and after she was spayed, she tried to "hump" him (and still does sometimes). So I think that demonstrates what Watermeadow says, -that it is, at least partly, an issue of power and dominance.
I think spaying and neutering is advisable because, as others have said, it goes some way to preventing dogs being stolen for breeding purposes. It reduces male aggression and straying and unwanted pregnancies.
There are already too many dogs looking for homes and we don't need any more.
I don't know if there is research to link these procedures to the development of cancer. However, our previous male dog - a largish cross pointer/spaniel,who had been neutered - lived to the age of 12 and a half, which was the average for his breed.