You ask "What is it that most malware will want to do?".
An excellent source for this sort of information is The Hacker Quarterly, which is so mainstream, you may find it at your local bookstore, or you can subscribe online to get it mailed to you.
It was started to help hackers and phreakers share information. It is still very popular with hackers today and is considered by many to be controversial in nature.
Contents of the Current Issue include:
- Not The Enemy
- Regaining Privacy in a Digital World
- The Security-Conscious Uncle
- Why the "No-Fly List" is a Fraud
- TELECOM INFORMER
- Finding Information in the Library of Congress
- Hacking the DI-524 Interface
- Simple How-to on Wireless and Windows Cracking
- If You Can't Stand the Heat, Hack the Computers!
- Security: Truth Versus Fiction
- Hacking the Beamz
- HACKER PERSPECTIVE: Jason Scott
- iTunes Stored Credit Card Vulnerability
- Zipcar's Information Infrastructure
- The How and Why of Hacking the U.N.
- Listen to Radio Hackers!
- HACKER SPACES - EUROPE
- Abusing Metadata
- Verizon FIOS Wireless Insecurities
- TRANSMISSIONS
- Using Network Recon to Solve a Problem
- Suing Telemarketers for Fun and Profit
- HACKER HAPPENINGS
- Plus LETTERS and MARKETPLACE
There is also an excellent series of articles on Hacking at Wikipedia and on Computer Viruses.
... And yes, it is important for programmers to understand how hacking and code breaking works, so they can do the best they can to circumvent it in their programs.