Look down at your keyboard. Go on. I'll wait. You'll most likely see a format of letters going:
It's completely random. There's a reason for that. C.L. Sholes, the inventor of the typewriter, knew he didn't have a machine that could keep up with fast typers. In 1860's Milwaukee, you didn't have that kind of technology yet. Typewriters jam when people hit too many keys too fast. (We had a typewriter in my house during my childhood that nobody used. It was primarily used to see how many keys you could stick at once.) Sholes knew this; an earlier model had gone straight alphabetical, and had all manner of jams on his hands.
Thus, the QWERTY format was created for the sole purpose of jam prevention. If it slowed down typers, oh well. Jams slow them down more.
It's not the only attempt to arrange a keyboard, though.
In 1932, Auguat Dvorak of Washington State University made this letter layout:
It served two purposes: first, all the vowels are next to each other on the left side- so as to encourage a kind of cadence between vowels and consonants- and second, the middle row is king. The Dvorak board does about 70% of the work in the middle row, as opposed to 40% in the QWERTY board.
Another shot was taken with the Colemak board, again trying to maximize the middle row:
Many other attempts have been made, though mostly only swapping a few keys from the QWERTY format, or to accomodate some other language.
And- because jamming is no longer an issue- some places have made straight alphabetical keyboards. But neither they, nor any other English-language keyboard, is in wide use.
Why? The QWERTY board came in the 1860's. Dvorak, the major competitor, wasn't until 1932. That's 70 years or so of people getting used to QWERTY, which became the major issue with every subsequent keyboard. It's muscle memory. Ultimately, the exact order of the alphabet serves no functional purpose and isn't in the ABCDEFG order for any purpose even approaching rationality. You can put the letters in any random order you want and it doesn't really matter. The only thing that matters is whatever order people know and remember. If they remember ABCDEFG in one place and QWERTY in another place, so be it.
QWERTY, in fact, has an advantage on ABCDEFG: it used to have a point.