It was designed that way on typewriters to avoid the jamming of the type arms
The QWERTY keyboard layout was devised and created in the 1860s by the creator of the first modern typewriter, Christopher Sholes, a newspaper editor who lived in Milwaukee. Originally, the characters on the typewriters he invented were arranged alphabetically, set on the end of a metal bar which struck the paper when its key was pressed. However, once an operator had learned to type at speed, the bars attached to letters that lay close together on the keyboard became entangled with one another, forcing the typist to manually unstick the typebars, and also frequently blotting the document. A business associate of Sholes, James Densmore, suggested splitting up keys for letters commonly used together to speed up typing by preventing common pairs of typebars from striking the platen at the same time and sticking together. The effect this rearrangement of letters had on maximum typing speed is a disputed issue. Some sources assert that the QWERTY layout was designed to slow down typing speed to further reduce jamming. Other sources assert the rearrangement worked by separating common sequences of letters in English. Ostensibly, the hammers that were likely to be used in quick succession were less likely to interfere with each other.