It's from games I think. With first person shooters the mouse usually moves the camera (look up / down, turn left / right), with the keyboard doing movement forward, back and sidestepping. For right handed people it's usually more comfortable to have the keyboard controls on the left of the keyboard, rather than the right side where the PC arrow keys are. Plus using WASD you have the surrounding keys that can be used for other functions. Of course withvideo games you don't realy need to worry about standard typing positions.
Although the Wikipedia article another person mentioned says Quake used it, ISTR the default keybindings were nearer to Doom[1]. It is possible to set Quake to use the now standard WASD + mouselook, I guess the layout just caught on with online gamers at the time (the defaults aren't that good), and became the standard.
[1] The manual backs it up, but I don't have the game installed at the moment.