“How are you?” is usually meant less as an actual question and more a greeting-on-autopilot—a casual call-and-response.
The unwritten rule of conversation is that you’re expected to reply with nothing more than a declaration of utter satisfaction with life.
People aren’t usually interested in hearing the real answer. Responding with a “Well, to be honest, I’ve been kind of down today. Had a bad day at work” could be a faux pas. You aren’t supposed to burden every interlocutor with your situation, particularly with people who aren’t close.
So “how are you?” isn’t a bad thing to say at all—most of the time. But, there’re occasions, readable with empathic awareness, when you shouldn’t ask someone how their day is going unless you’re going to listen to their response with genuine respect and interest.