More on the origin of spam. Brad Templeton's net-archaeology tracks down the roots of "spam" in the sense of repetitive messages.
But most people used MUDs to chat, and to play around and impress one another with objects they created. They were at first a highly evolved successor for the chat room.
The term spamming got used to apply to a few different behaviours. One was to flood the computer with too much data to crash it. Another was to "spam the database" by having a program create a huge number of objects, rather then creating them by hand. And the term was sometimes used to mean simply flooding a chat session with a bunch of text inserted by a program (commonly called a "bot" today) or just by inserting a file instead of your own real time typing output.
There are confirmed reports as well that the term migrated to MUDs from early "chat" systems. Rich Frueh believes the term originated on Bitnet's Relay, the early chat system that IRC was named after. When the ability to input a whole file to the chat system was implemented, people would annoy others by dumping the words to the Monty Python Spam Song. Peter da Silva reports use in early 80s chat on TRS-80 based BBSs, but feels since they imported other Bitnet Relay customs, the term may have come from there.
(Thanks, Brad!)