Demystifying Why Local Aggregation Helps: Convergence Analysis of Hierarchical SGD