SMS originated as a messaging protocol to carry debugging messages from devices that were being remotely debugged to make sure they worked properly on the cell network. It's a fixed length packet, with a 140 byte payload. You can get 160 characters in it when you use a 7bit char set specifically designed to work with SMS.

The engineers working on the devices wrote a little thing into the firmwares to be able to compose messages and send them to other devices, probably so they could troll each other, and the rest, as they say, is history.