Towards a Theoretical Understanding of Two-Stage Recommender Systems