Why the teenage brain has an evolutionary advantage