We obviously can't look inside candidates' minds (I'm not sure if I would like to) but here's some deduction:
Trump is not in the habit of backing down from claims. I'm not sure if there are many (or even any) real examples of him having done so.
In this case, he has claimed several times that the election is being rigged against him. He may fear that if he promises to accept the result unconditionally it will be seen as contradicting his own claim that the election is being rigged. After all, why would a guy like him accept what, according to his own claims, would be a result of election fraud?
To clarify, it's possible he is trying to be consistent with his claim that he already knows the election is being rigged. He is alleging that someone are trying to steal the victory from him by means of election fraud. It would follow from this claim that a Hillary victory would be a result of fraud. If we accept this premise (which Trump apparently does, since he has repeated the claim several times), then it follows that he would contest the outcome of such fraud.
Is there any truth to Trump's claims?
In this answer I had previously refrained from assessing at all whether the claim of rigging is accurate or not. However, after having seen undercover journalism videos by James O'Keefe, notably Rigging the Election - Video II: Mass Voter Fraud, I will at least say that such claims should not be dismissed offhand. At least two of the people featured in that video have now lost their jobs in the aftermath of the videos. As one commenter noted, "Scott Foval admitted to mass voter fraud on behalf of the DNC." I don't see any reasonable interpretation of, (or indeed, context for) the quotes from that video that can make one conclude otherwise. Various outlets have questioned the methods of said videos, and the integrity of their creators, but I don't see any way even isolated quotes from these videos can not be seen as extremely damning.
The Manhattan Board of Elections Commissioner Alan Schulkin (Democrat) has also been caught on tape this year talking about serious voting fraud in New York City.
Trump has referred to this journalism several times.
Apparently, this group of journalists has also received donations from the Trump Foundation. While that would impact their perceived neutrality, it does not invalidate the video and audio evidence they were able to collect.
Exactly how widespread such phenomena are or have been is obviously subject to speculation.
Disclaimer: This answer may be biased to some degree. I have a strong personal dislike of (if not disgust for) both major candidates in this election, and while I have tried to avoid it, my judgements and/or wording may still be somewhat subjective.