When you spay your dog, she benefits from a lower risk of deadly health conditions, and you benefit from the elimination of certain undesirable behaviors. The earlier you spay the better -- performing the operation before her first estrous cycle lowers her risk of mammary cancer later in life and can stop her from developing bad habits like urine-marking.
Spaying your dog decreases the risk of mammary cancer and completely eliminates risk of ovarian or uterine cancer. Her risk of contracting pyometra, a bacterial infection of the uterus, is also lower. Behaviorally, your dog will lower or completely eliminate her desire to roam the neighborhood, as the behavior is characteristic of females searching for mates. Similarly, she may lose her desire to urine-mark, a means of advertising her fertility to males. She will no longer experience the irritability associated with the estrous cycle, and she may even be less aggressive, as her behavior will not be so strongly influenced by her hormones.