Close friends regularly share time, private matters, and influence over life choices. The narration encourages choosing trustworthy, upright companions; it is not an instruction to insult others or withhold ordinary kindness.
Example 1: A student chooses close companions who encourage prayer, honesty, and serious study.
Example 2: The same student still helps a hungry or ill person in need, even if the person is not part of their intimate circle.
In طَعَامَكَ, the attached كَ means “your.” It links the food or invitation to the addressee and helps explain the interpersonal setting.