Then say they throw their rocks not at some store window, but at a power station. Maybe at a hydroplant (those turbines do not like large rocks), or a solar plant (glass!). Maybe its at a electrical substation (a wet/icy stick or metal rod between two lines will cause shorts and break things).
The damage from such actions can be catastrophic. Life and livelihood can be lost for a large number of people. What if the power for the hospital gets interrupted, or the chemical plant?
This leaves us with a simple question then. Should we send teenagers that throw rocks and sticks/rods in jail for up to 10 years? Is jailtime a proper method to discourage kids from throwing rocks at power stations? In my society, that's has not been the current approach, and we have not had much failures from kids throwing rocks at power stations (or hacks for that matter). Schools, proper parenting, and after school activities has served the role of prevention.