Why is it that turning 18 allows you to see and experience war but not drink?

Here in the US the drinking age is 21 but joining any of the military branches only requires age 18, you can go to war, shoot guns, kill people, use heavy weaponry and come back traumatized for your country but you can't have an alcoholic beverage in your country? I'm asking this question hoping there's a logical explanation for such a idiotic law.
Why is it that turning 18 allows you to see and experience war but not drink?
Post Opinion