When airplanes were first invented, like the Wright Brothers, they were really just to prove that it could be done. I don't think the Wright Brothers ever really thought about how airplanes could be used. I seriously doubt they anticipated that they might someday carry hundreds of passengers halfway around the world.
But the development of airplanes, as fast as it's been for 100 years, has been mostly due to their usefulness in wars. When airplanes were made bigger, it was to carry more bombs. When they were made faster, it was for pursuit or escape. Modern commercial airplanes owe much of the cost of their development to defense departments designing bombers and fighters.
For instance. Airplanes were first used in war in a big way in WWI. The first mass-produced airplanes were fighters in WWI. By the 1920s airplanes were already big enough to carry several passengers or thousands of pounds of payload. They were made of aluminum, not cloth and wood. The engines were much more reliable, more efficient, better hp/weight ratio. A whole new generation of airplanes came on the scene. But these improvements were ALL made for war, not for peaceful uses. Big manufacturers like Boeing and Douglas grew up because of defense contracts. Then after the war they used what they'd learned to make better commercial aircraft.