Samson's companions were not really friends of his. So he wants to have some fun at their expense. Before Samson presents the riddle that he made up, he wants to entice them to play with him. So he makes them a wager, a high-stakes bet. He proposes a contest that looks like it is stacked very much in their favour. But of course, once he shares the riddle, we get to see why he made the wager. He gives a riddle that is unsolvable.
12 And Samson said to them, “Let me now put a riddle to you. If you can tell me what it is, within the seven days of the feast, and find it out, then I will give you thirty linen garments and thirty changes of clothes,