Coming from a technical background, I can see the challenge for creating a computer virus being an intriguing one and, for some, an irresistible one.
An exercise in problem solving - for a problem that doesn't really exist, but still a challenge, an unanswered question and this can become an obsession by the technical mind that immerses itself so deeply.
From this, a viral mechanism is born. It can do whatever the programmer wants, within the parameters of its access to the host. The purist techie would be happy with that ... and maybe set it into the wild, to do some innocuous stuff - nothing malignant - and would possibly have a way of it being removed, so no ongoing effects exist. This would be a complete solution.
Where the problem arises is from these skills being utilised by people with issues who deal with them by causing pain to others or by criminal elements for more concrete objectives. (Please note, this is just my opinion and I make no pretence of any professional competency about mental or criminal factors.)