In 1874 Remington & Sons manufactured the first commercial typewriter, called the Remington Number 1. This typewriter was designed by Christopher Sholes and used the "QWERTY" keyboard we are all familiar with.
This early typewriter used a mechanism with characters on the end of a bar. When a key was struck, a linkage would swing the bar into a tape coated with ink. When the character struck the tape, the impression of the character was transferred onto the paper, which was positioned behind the tape.
Sholes' original prototypes had a problem with the bars colliding with each other and jamming. So he arranged the keys with the most common letters in hard to reach spots, to slow typists down and try to avoid this problem.
Whatever the reason for the QWERTY layout, it seems pretty unlikely that one of the first keyboard layouts invented would be perfect. The deficiencies of the QWERTY keyboard become apparent when compared to the Dvorak keyboard layout. This keyboard layout tries to minimize the distance traveled by the fingers. It also tries to make the typist alternate hands on consecutive letters as often as possible.
The Dvorak layout places all of the most commonly used letters in the home row so your fingers don't have to move at all to hit these keys. The left hand has all of the vowels and the right hand has only consonants. So there are no words in the English language that can be typed with only one hand on the Dvorak keyboard. Try typing "pumpkin" or "minimum" on your QWERTY keyboard.
This site has a neat comparison of the Dvorak vs. the QWERTY keyboard. It shows that if I had typed this article on a Dvorak keyboard my fingers would have traveled 30 meters vs. the 54 meters they traveled on the QWERTY keyboard I use.
If you want to, you can switch your keyboard to a Dvorak configuration just by changing a setting on your computer's operating system. This site shows how. Depending on your keyboard you may even be able to pry off the keys and rearrange them in the Dvorak layout.
Here are some interesting links: