Now how the hell did this shyt happen?
Intelligence comes in many forms. She was intelligent enough to skip ahead in school, but not intelligent enough to foresee the consequences of having sex as a teenager. The lack of emotional control of young people, means parents need to be extra-vigilent and also informative on the consequences of actions. So keep your children active in interesting wholesome activities, while also maintaining a watch on whom they surround themselves with as friends.
Even doing the above, some will slip through the cracks. Yet, putting in that effort as a parent drastically reduces the chances of your children ending up being teenage parents. So it should be all about reducing the possibility of a mishap, not allowing that possibility to arise with parental inattention or, even worse, neglect.