There would be more social opprobrium to save the pet, and the grief would undoubtedly be greater if the pet died instead. If nobody was looking, I think most would save their pet. Unknown unrelated people simply aren't very important. Wars would be impossible if it were otherwise.