People break the law all the time, it's up to the government to enforce it and many times the government is unable to do that. See here in the case of Malaysia, it's not that Porn was legal, it's that they weren't competent enough to restrict it or know about DNS things.