Unpacking Reward Shaping: Understanding the Benefits of Reward Engineering on Sample Complexity