The intentions of malware may vary. Two of the most common reasons are to retrieve private information or recruit your computer into a botnet (an army of computers used in harmful DDOS attacks).

Other reasons may be to steal/delete data, ask for ransoms, or hijack systems.