Even by the end of WWI, planes were starting to diversify into specific roles, for example in addition to the "fighter" role (like the Sopwith Camel), and the "two-seater" like the R.E.8, which was used in recon, artillery spotting, light bombing and so on, you get the first heavy bombers (Gotha G.IV, Handley Page 0/400), the first dedicated ground attack aircraft (Halberstadt CL.II) and so on.
The two-gun biplane fighter and two-seater general purpose aircraft remained current right up to the mid-30s - the British Hawker Fury/Demon/Audax family for instance - not least because European nations at least were either forbidden (Germany) or unwilling (most others) to spend lots of money on their militaries. During this period, with smaller aircraft still being constructed largely of wood and canvas, there was only really one place to put guns, which was on the engine block. When all-metal construction was introduced with the next generation of aircraft like the Hurricane and Bf109, more guns could be introduced, mounted in the wings.
That unlocked all sorts of other possibilities, and of course the nature of the "total war" of WW2 meant the entire aircraft industry was dedicated to designing, refining and producing warplanes for every conceivable use.
At the start of World War One we had very simple aircraft that were used for the reconnaissance role, as the war went on, aircraft became more and more specialized.
Some examples
Blériot XI - 1909 https://en.wikipedia.org/wiki/Bl%C3%A9riot_XI
Nieuport 10 - 1914 - https://en.wikipedia.org/wiki/Nieuport_10
Breguet 14 - 1917 (first widespread metal use) - https://en.wikipedia.org/wiki/Breguet_14
Fokker D.VIII - 1918 (monoplane fighter) - https://en.wikipedia.org/wiki/Fokker_D.VIII
Now they all look alike to the lay person, but the technology was advancing rapidly
The Blériot XI had a 19 kW (25 hp) engine, but by 1918 (9 years later) the Fokker D.VIII has a 82 kW (110 hp) engine and the V 29 variant has a 138 kW (185 hp) engine
But during World War One, there is more and more specialization, engines increase in power as automobile engines do in the same era. The US pushed automakers to develop a 300 kW (400 hp) aircraft motor, which is accomplished in three months (designed from 29 May to 3 June 1917 and in production by 4 July 1917 with mass production in August 1917).
The rapid advances in propulsion are equaled post war with government funded research labs like NACA's Langley, Ames and Muroc labs which pioneer thin airfoils and airfoil section research, the engine cowl to reduce drag and increase fuel efficiency.
By 1932 Boeing builds the P-26 which has a 400 kW (600 hp) engine - https://en.wikipedia.org/wiki/Boeing_P-26_Peashooter
I was actually about to post a similar question on WWI aviation but if it's alright I'll just post it here to save space: When planes began to be used as weapons of war was there any ethical opposition to this by military/civilian officials?