The story
Of unclear etymology. The most widely accepted theories are that apprentice printers were often covered in ink, giving them a demonic appearance, or that they were responsible for errors in manuscripts and thus associated with Titivillus, the supposed devil of scribal errors. See Wikipedia for further details.
Etymology from Wiktionary, CC BY-SA 4.0.