Airport flags are set up by airports because they know that take-off and landing are the two most dangerous parts of flying. This is when the aircraft is closest to the ground. This is also when the aircraft is most affected by sudden and strong variations in the wind. If anything changes, pilots need to know exactly what happened and what they can do to compensate for the changes. Otherwise, the aircraft is in danger.
The pilots always coordinate with the control tower. This is because they need to know ground conditions from where they are in order to make the necessary adjustments to get the job done. They also need to know what the conditions are in order to take-off properly. The control tower has different measuring devices like radar, barometers, and thermometers to help them.
They also refer to airport flags to get wind direction and wind speed to tell pilots whether they are going to experience crosswinds, headwinds, tailwinds, or if they are landing in still winds. This increases the chance for pilots to make a safe landing.
The airport knows that miscalculations can lead to endangering people’s lives. And they know that when a plane goes out, everyone aboard will be endangered. This is why they go to extra lengths to mark the positions of runways and hazards. They set up different kinds of markers like airport lights in the middle of and around those positions. They even set up danger flags at the end of runways to notify pilots of the length of allowable distance.