Teenagers’ brains are not yet fully developed. Specifically, the frontal lobe which regulates impulsivity doesn’t fully mature until the early the mid 20’s. This is the likely reason why teens engage in behavior they know intellectually is risky or wrong.
Brain scans have shown that one part of a teen’s brain is very sensitive to dopamine, the reward neurotransmitter. That means the teens feel anticipated rewards very powerfully. So the perceived fun of a pleasurable activity overpowers an adolescent’s ability to calculate the risk of that activity and refrain from engaging. This may explain why educational efforts, lecturing and preaching to teens aren’t very effective.