We are not explicitly told why Samson proposed the riddle, so any answer to this question is speculative at best. We do have some clues in the narrative up to this point that may suggest a reason for the riddle. First, the riddle fits with Samson’s character, as a brash young man who enjoys manipulating others (including those as recently as his parents, getting them to eat honey from a source that would alarm them). But even more seriously, Samson’s riddle would send a clear message to the Philistines that even though he may be among them, marry one of their own, they will never own him. Samson will always be his own man and relate to them on his own terms. They will never be able to control him, any more than his own parents could. It is Samson who will call the tune, not the Philistines.
1
Though the specific reason for Samson’s proposing the riddle is not given, we do know that all that has led to the riddle in this chapter was set in motion by the Spirit of the Lord rushing upon him in Judges 14:6. Thus, also this riddle is part of God's purpose of seeking an opportunity
against the Philistines (Judges 14:4). Ultimately, neither Samson nor the Philistines are in as much control as they may think they are; all are in the hands of the Lord, who will accomplish what he wants to (Judges 13:5).
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,