An 18 year old boy join the military, or get drafted if that's the case, be sent to die in combat, yet in most states he can't drink or smoke legally, and he certainly can't get a BJ from his 22 year old teacher.

Same way with a girl to a certain extent, as she can get married at age 16 to a man of any age, and start having babies, but she cannot have sex with her high school teacher.