Terrible story, the poor baby.
I think there needs to be a huge upheaval to the 'family dog/man's best friend/boyhood dog' tropes. People get dogs with the expectation they are amazing additions to the family with young children.
Dogs are incredible members of the family but they are as big a commitment as having a child. You are making the decision to bring an animal into the home that could kill you. They are autonomous creatures that require attention, respect, routine and discipline along with love and even then they are unpredictable.
There is always a danger of adopting dogs that you haven't raised from a pup and there's always a very taboo attitude whenever that it brought up.
'Adopt don't shop' is such a knee jerk reaction when someone wants a dog but it's not always possible. If you want a dog with young children it needs to be a puppy, if this comes from a reputable breeder or from a welfare facility that doesn't matter but rearing a puppy in the family is the best way to keep children safe. That way the puppy grows up understanding the family structure, being exposed to the individuals in the house and learning the appropriate ways to behave. It REDUCES (not removes) the chances of attacks.
Very often adult dogs enter homes with no/little experience of young children and it goes horribly wrong. This is why facilities will not allow dogs (especially adults) into the homes of young children, it's not safe.
There should be a governmental department that issues licences for both breeders and owners where appropriate checks are carried out to stop these kinds of private sales from happening. When people buy and sell dogs without understanding the breed/animal itself it always ends in tears. Unfortunately this time it ended with that poor little girl tragically losing her life.