There are long term health benefits to your pet when it is spayed or neutered. Ask your veterinarian to explain these. Obviously, the primary benefit is controlling the pet population and reducing the numbers of unplanned, unwanted pets.
Spay and neuter procedures are major surgery for your pet. The procedure requires the time of a veterinarian, newly-sterilized surgical instruments, general anesthesia, drapes, suture material, and hospitalization.
When measured against the cost of feeding and nurturing unwanted kittens or puppies, spaying/neutering is much more cost-effective.