Goodness should not be confined to expensive gestures. A kind meeting can create reassurance and trust. Giving helpful directions, listening sympathetically to a sick colleague, or responding respectfully to a strained relationship are related forms of everyday care.
مِنَ الْمَعْرُوفِ means “among acts of goodness,” marking the cheerful greeting as one form within a larger category. The preposition مِنْ conveys that relationship.
A smile used to conceal deceit or ridicule would contradict the sincere conduct described in the narration.