Is there a developmental purpose to adolescent transgressions?
The function of rebellion is to challenge conclusions reached by previous generations.

If the conclusions of each generation were not challenged, errors in judgment would be perpetuated, leading to larger and larger errors in subsequent generations as each successive generation built upon the false conclusions of the previous generations.

This can be observed in technological and entrepreneurial "disruptions", in which rebels (entrepreneurs) gain competitive advantages by challenging established assumptions about the market, or "conventional wisdom," and generate creative solutions that serve as more than just clones  of established business models. (PayPal, Facebook, Google, Twitter, Amazon, Uber, and perhaps even Tesla could be said to have profited from this disruptive, creative paradigm.)

Adolescents transgress for many reasons, but important to remember is that they often do so not in directed pursuit of goals, but rather to explore the possibility space and establish their sense of self-determination. Later, as goal-attainment becomes important, individuals who have explored larger spaces have larger bodies of experience upon which to draw, from which they can generate creative solutions.

I have no academic sources for these assertions. They are simply observations of learning patterns that I have seen others exploit, and thus learned to exploit myself.