Military aviators have been around since WWI, they started out as scout planes and took pictures of the ground below them to get an idea of what the enimies' battle plans were.
image of a recon pilot from WWI.
People started to put guns on the planes which then required another soldier to operate. The guns were mainly on the back and could easily shoot holes in the verticle stabilizer and messed up the plane's handling.
A WWI recon plane with a rear gunner visible just behind the top wing
A picture of Roland Garros' ace plane
After the Germans captured Garros and his plane, A man named Anthony Fokker invented the interrupter gear. The interrupter gear allowed for the gun to shoot straight through the propeller without hitting it.
Using this technology, Fokker designed the first proper propeller-based fighter plane. The plane was called the "Eindecker."
Following this, many German planes came put that dominated the airspace. The Allies finally caught up to the Germans in fighter plane devolopment.
From left to right: Nieuport 17, Sopwith Camel, Fokker Dr.1 Triplane.