When I see track athletics on TV, for example at the Olympics, I see a gun is used to start a race. Why is a gun is used instead of, for example, a whistle?
A gun provides a single, relatively discrete sound at a relatively constant volume throughout a meeting. The volume of a whistle will vary from blow to blow, depending on how it's blown. Also, a whistle is not a sharp sound; it's harder to pinpoint the exact moment of race starting, which is both challenging to the athletes and also difficult for the race timers in events where finish times are sliced to thousandths of a second. (Results are listed to hundredths with automatic timing, but the systems can time to thousandths; the extra precision is used to separate ties.)
This last is perhaps more important: in the days of Fully Automatic Timing (FAT) the starting signal needs to trigger the timing system. A specially configured starter's pistol can do that, but there have also been systems using a different audible signal, e.g. a loud handclap.