The dog is food driven (what dog isn’t?), and wanted that piece of chicken. Probably got it, too.
How large of a piece of chicken do you envision this girl stuffing her mouth, that the dog not only could see it to know it was in there, but to also know how to dislodge it, whether to prevent choking as claimed by the girl, or to pop a snack out of her throat as you claim?
Your anthropomorphization of the dog is much more extreme than merely attributing a desire to help the girl.
Dogs are very empathetic toward their people. That has been demonstrated again and again for centuries. There are breeds specifically bred for the rescue of human beings, in water, in snow, under debris.