It is possible he was not fully aware that cutting his hair would cause God to allow him to lose his strength; since it was actually the decline of his spiritual state that caused him to lose God's favor.