Switch from a lamp you move by hand to the real Sun. For a date and a place the Sun follows a fixed arc across the sky: it climbs in the morning, is highest at solar noon, and sinks in the afternoon.
The shadow follows along, pointing away from the Sun and changing length. This is how a sundial tells the time.