Understanding the Weight Averaging Mechanism in LLM Training for Post-Training Quantization