In a lot of instances it is down to the owners and the fact a bigger dog can cause more damage.
Yesterday I was walking along the beach with my 4 year old when a suasage dog ran at us snapping at my child in particular. No contact was made but the owners were a second behind it and obviously being small could drag it away (and give it a smack which hardly helps but there we go)
They did apologise but I still had a go, their dog scared my child and it should never have had the opportunity to run at us. Every other dog was on a lead and we walked past several big and small without drama.
Being a small dog it was easy enough to drag it away before it could cause harm but had it been bigger we wouldn't have stood a chance if it was set to attack.
I'm sure the heat doesn't help either and it's a combination of poor ownership, the nature of the dog and the size that makes these attacks so bad.
Some dogs can be abused every day for years and wouldn't last out, some are abused and finally snap, some just lash out out of nowhere despite impeccable ownership and some have impeccable owners and are lovely. Goes for big and small.
I do think kids especially should be taught how to behave around dog's and shouldn't run up to one but toddlers especially have no impulse control and accidents happen. No dog should immediately rip the child's face off and that's where socialisation comes in for the dog as well.
If I owned a dog and it bit anybody seriously I wouldn't be putting it to sleep because I don't think it's safe to have in public. A warning nip from being provoked or startled I would let slide but I would likely muzzle in public just to be on the safe side regardless of its size.