You: "Good morning. How are you?"
Other person: "I am fine thank you. And how are you?"
You: "Well I'm feeling pretty bad actually."
Other person: acts offended and walks away
It is likely that most if not everyone has experienced a social encounter like this. That question is not usually asked out of genuine concern, because if it was then you would not be met with hostility should your response be honest. If the situation is different - so you decide to avoid the "small talk" altogether - this too will be met with offense; you are stuck between rocks.
Yes, that exchange with anyone other than a
very close friend is meant as a social lubricant, not to be taken literally. And really, the friend would ask differently and not use that standard 'handshake' format. It's like the exchange two computers have on a network, where they greet and acknowledge each other's existence, and establish communication for that session. With people, the session is that day, and is essentially to set the stage for potential further communication as the day progresses.
Breaking the format is entirely valid, as that's a signal that further communication may be difficult that day. A larger degree of breakage may signal problems ahead for multiple days, or longer.
A lot (or most) people
want to care, but simply don't have the 'bandwidth' to spare over their own issues.