I would suggest it has something to do with interest in the task and the complexity of successful completion.
If one has interest in a subject (task at hand); then, focussing on that task becomes a relatively simple chore. The task, in many ways, becomes enjoyable. However, if there is no interest in this subject, the task becomes onerous, boring and downright unpleasant. The chances of completing this task satisfactorily are low.
The complexity of the task is also a significant portion of the equation. If a task is too simple - maybe even repetitive - it could hold little or no interest. The same is true if the task is highly complex requiring intense concentration.