Learning and Hierarchies in Service Systems