No Two Devils Alike: Unveiling Distinct Mechanisms of Fine-tuning Attacks