The dog attacked, but it's the actions of humans that allowed it to get that far.
The dog was 'rehomed'
Any responsible breeder would have a clause in their contract stating that the dog can and should be returned to them in the event that the dog needs to be rehomed.
The fact that this didn't happen will be down to unlicensed, backyard breeders. This needs to be clamped down on.
On the same note, the parents made a choice to 'rehome' a dog, rather than rescue. This is because the option to rescue with a 4 year old in the house wouldn't be there. The fault lies with them.
I would also bet my last pound that this dog will have been giving out signals and warnings for a long time before it attacked. Again, the onus lies with the parents to pick up on these and act accordingly.
What has happened is an awful tragedy for the child, and also her parents. They will have to live with this for the rest of their lives.
Dogs can be, and are, owned responsibly.
I have a dog, and I would be more than happy to have to prove my worth when in comes to owning him.
A licence, tests in order to receive that licence, I'd be happy to comply.
Things do need to change, but I'm really not sure how it could be implemented and policed.
Breeders would probably be a good place to start.