I guess that period of malware that you've mentioned is the
ikee virus? First of all, it should state "Jailbroken with SSH installed but don't ever bother to change the root and mobile password" phones. It's like password protecting your computer but put a post-it note on the monitor with the password on it.
Jailbreaking is bad when those people don't know what they're getting into. That's where JB = piracy where new people acquiring an iPhone (but too cheapskate to buy apps) would ask where to get "free" apps and most people will say "You need to jailbreak the phone to install 'free' apps". It's a right response from Apple not to be responsible to any mishap happened because of Jailbreak, because it clearly stated it void the warranty but it is not illegal (only recently).
Jailbreaks at the same time breaks the limitation boundaries where the JB community gives the first copy/paste functions (then apple just sugar coated it to make it nice), ability to change wallpaper in the early days, bluetooth capabilities and lots more. Just look at iOS5 notification center, taken from the JB community but not only the concept but the developer as well. Most saddest of all, the ripoff of wifi sync where the community had it for a year and Apple just 'Copy & Paste' right to the icon. I could just imagine how the developer would feel (and he even submitted the app thru appstore but got rejected).
Jailbreaking scene is like a technological testbed for Apple to see what works and what doesn't. If that thing work then they will incorporated it in the next iOS update. It's just that they do it better (heck because it's their system to begin with). Suing those devteam would not benefit them at all, just look what happened to Sony. And like you said, they have debuggers, security analyst and innovation thinkers that they don't have to pay to help them make better iOS.
True true ... it takes 5 iteration of the iOS before something as useful as the Notification center and wifi-sync to appear in iOS. Let's not ecen go to the currrently crippled Bluetooth of the stock iOS. Celeste helps but Celeste is so buggy that I am still pissed that I spent 10 bucks on an apps that is pretty damn useless as well. Apple needs to do something about the Bluetooth, it's a joke that a "smartphone" can only use the BT for pairing with a headset ...