In general there is no such requirement:
What do Hindu scriptures say about gambling?
But in the case of Yudhistira, he seems to have made a vow not to refuse a gambling challenge:
‘Yudhishthira said, “It seems that some of the most feared rogues
have assembled there. They are sure to play with the powers of maya.
However, everything is under the control of the creator. I will not refuse
to play with those rogues. O Vidura! I do not wish to go and gamble on
King Dhritarashtra’s command. A father always has a son’s welfare in
mind. Therefore, tell me what I should do. I have no desire to
gamble with Shakuni. But if the confident one challenges me in the
sabha, I will never refuse, because that has been my eternal vow.”’
Shakuni gives him a chance to back out, but Yudhistrira insists on playing:
‘Shakuni said, “O Yudhishthira! The learned triumph over non-learned
only through trickery. That is how the wise triumph over the stupid, but
people don’t call it trickery. In approaching me for the game, if you
think that I will resort to trickery, if that is your fear, then refrain from
the game.”
‘Yudhishthira replied, “O king! Once challenged, I will not withdraw.
That is the vow I have taken. Fate is the powerful one and we are in the
power of destiny. Who in this assembly will I play with? What is the
counter-stake? Let the gambling begin.”