I'm all for explaining calmly to a child that what they're doing is wrong, and why. However, there are times when the short, sharp shock of a telling off is necessary. If a child is putting themselves or others in danger, or are continuing after being asked to stop.
If any child is throwing things at people, especially a young baby, having been asked to stop, then I think a parent is perfectly justified in raising their voice to indicate enough is enough. Obviously I don't mean screaming in their face and scaring them, just turning up the volume slightly and being firm.