Towards Understanding Hierarchical Learning: Benefits of Neural Representations