@bob_ – On reflection, I guess I’d refine my translation, which was of the literal meaning rather than the expression.
“How do you like them apples” is an invitation to describe one’s feelings and opinions about something (not actually apples, unless the asker is being ironic and actually asking about some apples). To your question, which seems to be at how the metaphor would make sense, I defer to Harp’s suggestion about the original meaning, but also note that people use it without likely knowing the origin. In my personal experience hearing it said, though, I do think of the metaphor too as asking for opinions and feelings, which can certainly be said about apples, and often is when discussing the enjoyment of apples, e.g.:
“I really like apple type X from Y for pies. I like type A too but X are my favorite for pies.”
“I hate those apples you get from UghMart. They’re always dry and sour-tasting.”
Full disclosure: the state I grew up in is a major apple producer.