First of all, you have to log into B.net to play the game, regardless of whether or not you want to play single player (with achievements enabled that is, offline mode exists but it disables the achievements).
So, technically, they were indeed online. The players who did this have done so to abuse the achievements, which are, well, an online function. If they wanted to get through the campaign quickly or cheat during matches with the AI, they could have done so using the in-game cheats.
They used trainers instead. I agree that in single player mode people should do whatever they want, trainers and cheating included. It's all about altering the game files which shouldn't have been done *online* in the first place. But as it stands, I don't have much of an issue with this. Blizzard gave them a 14 day ban, when they could have easily justified a permanent ban, since they can start up online games just as easily as they started up games versus the AI, or the campaign.
Also, Blizzard can't possibly tell the difference between someone using trainers in single player without malicious intent and someone who intends to eventually use it online. So they were not banned for cheating during single player. They were banned for using trainers while logged in.
Besides, their intention of getting achievements seems malicious enough already, considering you get in game rewards for achievements you've done, that other players can see, such as portraits. When playing online, you see this cheater's portrait, and you end up with the illusion that you're up against a guy who won 1000 matches as protoss/terran/zerg/random.