Why were World War 1 planes invented?

Planes were not invented for war, but used in war. When the Wright brothers flew the first plane in 1903 it wasn't thought of as a machine for war. At first it was seen as a novelty. Wing walkers and performers would do stunts with early planes and mail was delivered by plane. As with any technology eventually it may be used in war. In the civil war hot air balloons were used for reconnaissance so it was a natural progression that the biplane was created for war.