Spam, as in irrelevant or inappropriate postings or unsolicited email, comes from the tinned meat product via a comedy sketch in Monty Python.
Jay Hormel of Hormel Foods released the tinned ham product in 1937, trademarking it Spam with the description ‘for canned meats - namely, Spiced Ham’, implying the name was a portmanteau of the two words.
Such large quantities of Spam were imported to post-war Britain as it rebuilt its food industry that Monty Python made a comedy sketch featuring a cafe where every item on the menu contains Spam and a chorus of vikings singing "Spam, Spam, Spam, Spam… Lovely Spam! Wonderful Spam!".
Years later when marketing companies began to flood the global discussion system Usenet and email inboxes with unsolicited junk mail, it became known as Spam - a reference to the repetitive bombardment of the unwanted menu item in the Monty Python sketch.
Source: Hormel: The Spam Man - Life Magazine, 11th March 1946.
Oxford English Dictionary | YouTube