Why was the first computer made?
To break the coded messages produced on the WW2 German Enigma machine.
The first electronic computer was made at Iowa State University, but, alas, it could not be reprogrammed. The "Z" computer was made in Germany, and was the first to be reprogrammable. The British Colossus computer was made at Bletchley Park, UK, but the first general-purpose reprogrammable computer, called ENIAC, was made at the University of Pennsylvania in 1946.