They both can lead you to a ban if you use it wrong.You're only looking at it from one perspective. Look at it this way, if you really cannot compare the two because they do supposedly different things, then how come people get banned for both? In Nintendo's eyes, they are both bannable offenses so stuff like "firmware" and "software" make no difference to them.
They got banned probably because they were doing dirty stuff while on CFW (piracy, cheating, installing something not recognized by Nintendo... I really won't be able to know). But surely without the CFW they won't be able to do it. It's not the CFW's fault, it's the way people use it. CFW can open many gates, so you hardly will track people stupidity.
From what I've been reading, there haven't been any bans by simple homebrew usage so far, even if taking switch online.