There is a "joke" program called something like Crazy Mouse that causes behaviour like you are describing.
I can't understand the warped minds of people who inflict these things on others but it may well be this.
Have a look in Google about it.
Best computer security tips
Artists have collaborated with Indonesian schoolchildren to create wonderful charity T-shirts
Best Mac monitors & displays 2018
Sécurité : comment protéger votre iPhone contre les pirates informatiques ?