I am so sorry for your loss. One thing I always do these days, especially before a first surgery, is have general blood testing done. Sometimes that yields unexpected results and can save a dog's life. So I do it routinely now.
Thank God, I have never lost a dog to surgery, but my veterinarian--who has lost very, very few in many years of practice--does not take the risks lightly at all. Some vets do lose more dogs than they should.
I had one dog who had been neutered as a puppy--but not all the way. They got in there before they realized he had an undescended testicle. They removed the descended one, and then he started to crash from anesthesia. So they revived him without removing the undescended one.
When I got him, his previous owners had neglected to have that undescended testicle removed, he was nearly 2 years old, and he had Lyme Disease! He needed a month of antibiotics and a better blood titer on Lyme Disease before the vet would approve surgery. (My reliable vet!)
After we passed that hurdle, I decided that considering his crash under anesthesia as a puppy and the possible complications of removing an undescended testicle, we had better use a surgical specialty for this proceedure. We did, and all went well. We also made sure they knew about that early anesthesia problem, so they could adjust for it.
I am so sorry for your loss. It is a hard way to lose to lose a dog, and I guess it always leaves unanswered questions. It certainly can happen. But don't let it cause you to not have your next dog neutered, or surgery when indicated and advised by a good veterinarian. Just keep in mind the risks, and precautions you can take. Blood testing in advance is always worthwhile.
-----
Kathy Diamond Davis, author, "Therapy Dogs: Training Your Dog to Reach Others," 2nd edition, and the free Canine Behavior Series articles at http://www.veterinarypartner.com/Content.plx?P=SRC&S=1&SourceID=47