Age span isn't a good indicator of health used alone. A dog can live a long life suffering, or a short life in perfect health...
Dogs are just like people, and what someone can tolerate to survive varies greatly. Some people can live long lives eating junk food every day. Some can't. But IMO its best to start off with the best food you can possibly use, and work from there.
I've seen pets die from Purina foods, my stepdads cat needed surgery for a urinary blockage caused by bladder stones that was tracked back to the purina food. He fed the cheapest, kit'n'kaboodle.
I also think in many cases vets will start prescribing diets just because they don't know where to go from there. Too many pets are put on prescription diets that don't need it, and would be much better off on a high quality diet. I nearly lost my cat Piper due to feeding Iams multicat food. She lost a ton of weight and started having issues with daily vomiting and diarrhea. We were back and forth to the vet and did a ton of tests, various prescriptions. She wanted me to start on a prescription diet because we couldn't find a cause. I started researching cat nutrition, and switched to a high quality food. She made a complete turn around and was healthier than she'd ever been in her life. She had always been pretty skinny and hard to keep weight on, looked like Scar in the Lion King. But she gained all of the lost weight and more. So I found a new vet.