For people who have really bad anxiety (generally social anxiety), the dog can do something called Deep Pressure Therapy, where they push their head or paws against the person to help them ground themselves. They can also help the person find an exit if they are getting too overwhelmed and help prevent a panic attack in this way.
There are a lot of invisible reasons for people to have service dogs. Seizures is another that you don't always see until the person has it. The dog senses the changes and starts to alert the person so that they can get into a safe place/position. I know a girl who actually completely checks out mentally and simply goes off. Some days when this happens she collapses and starts convulsing. I witnessed this myself a few weeks ago when we were out with the trainer. Thankfully her aunt was right next to her and I stepped up to help carefully lower her down and brace her against my legs so her head didn't hit the ground. Her sister brought their car around and brought her aussie out who is being taught how to alert others to help her and keep her from wandering off. As soon as Shiva was near, the convulsing slowed and she focused completely on the dog.
But when we were all just standing around and talking, you wouldn't know anything was wrong with her.
There is a lot of controversy right now dealing with service dogs as they don't have a true registry, and the list of things that we are discovering dogs can alert to in people is getting longer. They can be taught all kinds of tasks to help someone out.
I have some issues with my ability to hold onto objects and my legs are not 100% reliable to keep me upright either due to pain or nerve functions. Most of the time, you'd never know. When it flares badly, I tend to grit my teeth and push on, but when I have my golden with me, he is extremely helpful to keep my balance, help me up, pick up something that I dropped, brace so I can bend over, help me navigate over unstable terrain.
Dogs are pretty awesome tools in helping people live independent lives.
Just because the person is standing and smiling doesn't mean that they have no reason to have their dog with them.