Note the article said "while the child was visiting his father" and "the father's girlfriend". I read that to assume that (a) the boy didn't live with his father and (b) the baby probably was a half-sister, born of a relationship the father had with his "girlfriend". From those two observations, I would make a good guess that the child did not have much of a home life and that at least one of his parents was leading a tawdry life of his own, and (c) There was a lack of loving nurturing in the kid's own home, i.e. he's witnessed other beatings.
All that said, this is a dreadful act; but the kid is probably not altogether totally to blame.
Local news described the sibling relationship as step-sister. Also said the boy was jealous of attention the baby received.
"There was a lack of loving nurturing in the kid's own home, i.e. he's witnessed other beatings."
I will bet my left leg, my good one, on that statement! Children copy what they learn from their parents. Yell at your child and they will yell at their sister and/or brother, hit your your child and they will hit their sister and/or brother.