Kids act out; it's just a fact of life. They're a morass of growth spurts and hormones and love and misunderstandings, and sometimes we can't decide whether to hug them or hide from them.
Part of growing up is testing boundaries. Parents can tell a kid what not to do, but for some, they need to experience something (and its consequences) before the lesson sticks.