Now these are those who came to David to Ziklag, while he yet kept himself close because of Saul the son of Kish; and they were among the mighty men, his helpers in war.
The occasions for these desertions to the cause of David was the period of David's residence at Ziklag, as related in  2 Samuel 27-30.  (See my commentary under those references.)