It's not like 18 year old soldiers are just given a gun and a uniform and are being sent into battle. They are being trained, disciplined and drilled into a battle-ready soldier who is capable of making decisions based on orders and the strategy given. While 18 is not the most mature age in the world, they are being prepared for whats ahead.
As a contrast: Someone who is 18 years of age doesn't recieve training and drilling in how to responsibly consume alcoholic beverages and handle the drunk state of mind one gets himself into. Even if such trainig was provided when someone is drunk the training flies out the window.
My point? An 18 yr old private with a gun in the hand is able to think more responsibly and maturely than an 18 yr old student with a 40oz. This is probably also the reason why army is 18 and alcohol is 21.