He told her all his heart, and said to her, "No razor has ever come on my head; for I have been a Nazirite to God from my mother's womb. If I am shaved, then my strength will go from me, and I will become weak, and be like any other man."
The reason Samson lost his strength was only secondarily that he allowed Delilah to cut his hair. The real reason was that "the Lord had departed from him" (Judges 16:20). When God’s Spirit departed from someone under the Old Covenant, the results were disastrous (cf. 1 Samuel 16:14; Psalms 51:11).