My experience is that the persistent people I know have at least some degree (and often a large degree) of internal motivation. They do things because the process of problem solving is rewarding in and of itself, and/or they have some intrinsic motivation about solving the problem. They are not out to please anyone else except themselves.
Maybe no one is purely 100% internally motivated. But my experience is that the more persistent people I know generally have a higher percentage of internal motivation. In contrast the people who give up more easily generally have a lower percentage of internal motivation; if they really only care about the external reward, it often turns out there are lots of ways to do that, and many are shorter than solving "hard" problems.