It's a mistranslation. The passage in v 14 should read "But the spirit of the Lord departed from saul, and an evil spirit which was not of the Lord troubled him" ... The message being that when we choose to act against the will of the Lord, we place ourselves out of the influence of his Holy Spirit. When unprotected, we are then left to the buffetings of Satan, who will gladly send his minions to torment and afflict us.
For some related scriptures on this topic, see:
1 Sam 28:15-16
Hosea 9:12
Psalm 51:11
Romans 8 (v 9 in particular)
Hebrews 6:4-6
Thessalonians 5:19
Jude 1:19