There is an explanation for this behavior: He had Greed reattached to his soul when this scene happened, which says a lot about the nature of Greed’s personality and what part of Father he was: Ergo, Greed was the part of The Dwarf in the Flask/Homunculus/Father that was friendly, personable, and wanted to have and maintain connections with other people. This is why it makes sense that in the end, Greed realized that the one thing he truly wanted was friends - he was above all else, comprised of The Dwarf’s discarded desire for companionship.
Hohenheim even makes a comment that makes reference to this when he meets The Dwarf again as Father; that The Dwarf had been a much more interesting person back when he was just a little ball in a flask, long before he separated the sin homunculi from himself.
This also helps explain why after he removed Greed from himself again, Father’s personality went back to being that of a calculating, robotic villain.