I think it's natural for pitpulls to be defensive, but I don't think they'd just attack a child unless:
a.The child was provoking it in some way (i.e.teasing it, throwing objects at it, hitting it, etc), whether she knew she was or not, seeing as she was only two.
b.The dog grew up in a disfunctional surrounding. That's usually the case as to why most vicious animals grow up that way. The owners either train them to be dangerous or they mistreat them.
So all in all, not ALL pitbulls should be put down. My father has a pitbull, and it's one of the most loveable dogs you'll ever see! It loves attention, and was even raised around my two younger brothers, even as babies.