They served David as officers over his troops, because they were all outstanding soldiers. Later they were officers in the Israelite army.