When Delilah saw that he had told her all his heart, she sent and called for the lords of the Philistines, saying, Come up this once, for he has told me all his heart. Then the lords of the Philistines came up to her, and brought the money in their hand.
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).