If we leave aside the possible presence of diseases like arthritis or diabetes, several mechanical factors could make standing still more tiring than walking.
First, the action of the muscles in walking keeps the circulation of both blood and lymph going, preventing the pooling of fluids in feet and ankles.
For another thing, when a person stands still, each foot is supporting about half the body’s weight all by itself all the time. But in walking, there is a momentary respite for each foot as the other makes contact with the ground. When the unburdened foot swings forward, it is free of weight-bearing duty for the time it takes to complete that stride.
Experts in easing the fatigue of those who must work standing up for long periods often suggest making a conscious effort to shift weight from one foot to the other and elevating the feet alternately on a footrest.
Another fatigue factor in standing still is that the surface underfoot remains the same. Studies of store employees and shoppers have found that there is less perceived fatigue even in walking if the flooring changes periodically, perhaps from wood to carpet. A resilient surface also helps.
Also, someone who plans to take a walk may have chosen more supportive and comfortable shoes than the person who unexpectedly encounters a long line at the bank.