We cannot be sure as to why God chose to leave Samson at this point, as opposed to sometime earlier when he began to break his Nazirite vow; the author does not spell out the Lord’s reason for him. So we are left with speculation. But could it be that having his head shaved was the last straw? Samson was bound in his Nazirite vow by the regulations of Numbers 6:1–21. He has now violated all those regulations. First, he touched the honey from the lion's carcass where bees had made their nest (Judges 14:8). He should have stayed clear of all corpses, but he did not; he went to the carcass and scooped out some honey. He also subsequently touched the jawbone of a dead donkey, which again points to a breaking of the regulation. Second, when he went to Timnah for his wedding, he prepared a feast there (Judges 14:10). The Hebrew word for feast
comes from the verb to drink.
That was, in other words, a drinking party, and it is highly unlikely that Samson was there merely as the designated driver. Thus, the second aspect of the Nazirite vow, abstaining from alcoholic beverages, was violated as well. This leaves only one more regulation for Samson to break, namely, the shaving of his head. And so with Delilah now having his head shaved, he breaks his third Nazirite vow. Perhaps with this, the Lord views his vow as completely broken, and thus now leaves him.
Another possibility is that this was the only time when Samson actually violated the Nazirite code. The law regarding corpses may not have actually applied to or included animals, and the text in Judges 14:10 never says that Samson actually partook of the alcoholic beverages. So it could be that Samson did not earlier violate any of the Nazirite rules before his incident with Delilah’s having his hair cut. But what then might be the point of those earlier incidents in the narrative, which appear to echo the Nazirite regulations of Numbers 6:1–27? It is hard to get around the notion that such incidents help to contribute to the overall incongruities of the story, which include Israel not asking for deliverance but God delivering them anyway, God enabling a barren woman to conceive though she did not ask for a child, and when the Spirit begins to move Samson, he goes to Timnah and picks out a Philistine wife, violating the Lord's standard regarding intermarriage with foreigners.1
It does seem more likely that Samson was violating his vow at various parts all along, and that this was now the last straw. (See this note at Judges 14:9 on the matter of touching an animal’s corpse instead of a human’s.)
20 And she said, “The Philistines are upon you, Samson!” And he awoke from his sleep and said, “I will go out as at other times and shake myself free.” But he did not know that the LORD had left him.