Academic motivation is a force caused by a wide range of internal and external factors, which people experience in different quantities at different times. Sometimes, you are in a course simply because you are obligated to be there and you do well because you need it to accomplish a long-term goal. Sometimes, you are solving a course problem because you find it intellectually stimulating. Sometimes, you give up on a problem because you believe you cannot succeed. Sometimes, you are simply unmotivated because you are tired and don't want to deal with stuff anymore. The MUSIC model of academic motivation [1] suggests a number of factors involved in the process.
Of course, I don't want to sound entirely dismissive - I definitely see the value in ensuring students perceive the "need" to solve a problem, and it's undoubtedly fantastic for an instructor to create that perception. I just wanted to voice that there's more to motivation than just the one avenue, and that's not necessarily a bad thing.