While some assert that these are only rhetorical questions, polite phrases and questions do serve their purpose. When getting together with a friend, one can only hope that they respond honestly as to how they are feeling. After getting this integral information, it is much easier to get a feel for what they may be interested in discussing in later conversation. If they respond by saying how stressed they are because of a big project, it could be in their best interest if the conversation was more centered around fun topics and gossip rather than heated issues like political debates.
In a different context, however, these colloquial phrases are nothing more than niceties. For example, when out to dinner with family and a friend of an uncle comes to say hello and introduce themselves, it's likely that both you and they are only being polite when shaking hands and exchanging "nice to meet you"s. In my own experience as a caddie, I have noticed myself having the same conversations over and over again with different golfers everyday. While it can be somewhat annoying and repetitive, I understand the necessity of having a polite relationship with those who employ me. Actually, I don't really mind, especially now that I have figured out which stories and niceties will get me the biggest tips.