Most young adults do understand that the actions they take in some form or another are against the law, and could end up getting them in trouble, but they actually don't quite comprehend the consequences, chances and long-term impact of these choices.
If one of my clients is charged with possession of marijuana, it doesn't mean the young man or woman doesn't know that for them marijuana possession is illegal, but frankly "they don't care" - they'd rather focus on the short term thought of being cool, fitting in and enjoying the marijuana vs weighing the downside of "well what happens if I am caught with marijuana?"
That may seem like an odd way to look at the problem as an adult, but that's exactly why the proper proactive plan and context must be placed on a juvenile case from day one. The prosecutor and judge are going to be grown adults and unless they have significant experience with 1000's of juvenile cases they may just view the client the same way they might view an adult. Failure to see the real issue will result in a marijuana case becoming just another marijuana case or a shoplifting case just being an another shoplifting case.
In reality these cases are just maturity and undeveloped decision making cases - they come in different forms and results, but the root of the issue is a common theme. When I work with a juvenile client, we take a few steps back and focus on everyone going on in the client's world. From school, family life, community engagement, job and future goals and plans.
I hold my juvenile clients accountable beyond what a court may order, add extra layers of formal education, insight and experience based education to drive the message home and help push that client in the right direction. Shifting the focus from purely short term choices to a focus on middle to long term choices. It's always important to create a path for the prosecutor and judge to view of the client; hand them the directions to where you and the client are planning on going, and how we are going to get there. I like to get the prosecutor and judge to see our vision and adopt our plan.