"Meditation has what do with this, exactly?"
I think you are taking an extreme position on this issue. Meditation may not have everything to do with this but it does play a significant part. In my experience, meditation helps you analyze, hold and channel your thought process better. If your thought process is better, you have better control over your impulses.