Why Are Flags Flown at Half-Staff?

Happy Flag Day, everybody! Have you ever wondered why flags are flown at half-staff in times of mourning? What length of time is appropriate? How'd the tradition get started? All your half-staff questions are answered in this Ethan Trex article from last November.
*
Last year, Stacy Conradt dedicated a Quick 10 to the American flag, which touches on the origins of Flag Day.
*
And if all this talk about flags puts you in the mood to take quizzes on other flags, here are a few: State Flags, Flags of the World: The Hard Ones, and Flags of the World: The Striped Ones.