As Kodiak says, it is a usage. My most frequent use of a flag is when I shade the lens with my hand to avoid direct sunlight into it when the sun is just outside the image area. The hand serves as flag.
I should have thought of that simple example! …thanks Urban.