The storyFrom mal- + code, presumably modelled on earlier malware.Etymology from Wiktionary, CC BY-SA 4.0.