Hunger is a primary drive, an innate biological motivator to eat to reduce the hunger drive.
Attachment is a secondary drive learned by an association of caregiver and satisfaction of a primary vibe.
Sears et al suggested that as caregivers provide food, the primary drive of hunger becomes generalised to them, (seen from the infants point of view)