A brief history...
Instant messaging has been around on the Internet for longer than the World Wide Web. In its earliest, purest (and, it's probably fair to say, crudest) form, it was possible to use the Unix command line tool write to output a message to another user's terminal, provided that they had previously typed mesg y (i.e. messaging yes), or indeed to directly echo or even cat the contents of a file to another terminal.