Why, hello there. Basically, it means "Hello.(with a hint of surprise)"The usage is kind of old. It's used less frequently in the U.S. these days. It's similar to how we might say "Oh/well/ah, hello there". We don't have to say well, oh, why, or ah. Sometimes we do use them to indicate surprise. We tend to use "Why, hello there." in a playful manner. As for the origin, I have no idea.
Let's say you're watching a show on tv. On the show, a breathtakingly gorgeous woman walks over to the bar to sit down. There's also a man there and when he notices her he says, "Why, hello there beautiful. " Perhaps he said that because he was either a. surprised to see someone, b. surprised(and delighted) to see such an attractive woman or, c. both a and b.
Let me give you another example. Let's say you see someone who you haven't seen in a very long time. You could say, "Why, if it isn't Bob Barker! " You would include "why" to show your surprise. I hear older people use it sometimes. People over the age of 40, I'd say. It might depend on where the person lives. I live in the southern part of the U.S. and I've heard it used in this situation many times.