Because, as I said, one is the law and the other is a matter of contract.
Here's a real world example of the difference. Let's say that I contract with you JMark; you're going to pay me $100 to haul something in my truck. As part of that contract, we agree that if I get caught speeding, I've violated our deal. I deliver the goods, but have to admit that I got caught speeding along the way. You, being a good guy, decide that the speeding deal wasn't really that important because you were actually too worried about safety; as a result, you decide to pay me anyway, even though I technically violated the contract by speeding. That's your prerogative -- nothing makes you enforce that agreement.
Now, suppose that the cop who stopped me for speeding agrees with me that it was a pretty silly violation, but still writes me a ticket. When it comes time for me to go to court on the ticket I got for speeding while hauling your stuff, I argue to the judge that I shouldn't be fined because the cop thought it was a silly violation and because you didn't think it was a very big deal. The judge looks at the governing statute and it says that a person caught speeding shall be fined $100. He says he agrees with me that the cop and you were right, but ultimately says the law doesn't permit him to make an exception for anyone and that according to the law (the rules that he has to apply to everyone who gets a ticket for that violation) he's required to impose a $100 fine, regardless of whether the ticket was silly or not.
Here, the anti-gambling issue is purely contractual and is terminable at the will of the parties to the contract; the suspension for leaving the bench, on the other hand, is the law and Stern is the judge saying "I have no choice but to enforce it."