Sometimes people just say things without thinking or meaning any upset.
Yes, they do, because it is natural and greetings are awkward. You can't start imposing rules about what people say when they are speaking "without meaning any upset".
"How are you?" doesn't mean the person asking wants a detailed answer. It's just another way of saying Good Morning or Hello. It's an opening. The answer can be whatever the person who is asked wants to say, such as, in the case of an ill person: "I'm here to see SoandSo."
Other people don't know what you're feeling unless you tell them so, naturally, they treat you as if you are not suffering grief or illness. What the hell is wrong with just saying something "to be polite"? The word 'polite' is the important bit.
Is the world really as full of grumps and fault finders as Gransnet threads sometimes makes it seem?