Keller's decision about the former:
The question we start with as journalists is not "why publish?" but "why would we withhold information of significance?" We have sometimes done so, holding stories or editing out details that could serve those hostile to the U.S. But we need a compelling reason to do so.
The decision on not to publish the Mohammed cartoons:
New York Times editor Bill Keller said that he and his staff concluded after a "long and vigorous debate" that publishing the cartoon would be "perceived as a particularly deliberate insult" by Muslims. "Like any decision to withhold elements of a story, this was neither easy nor entirely satisfying, but it feels like the right thing to do."
Thus we can conclude that--from the perspective of the NY Times editorial staff-- protecting the feelings of Muslims is far more "compelling" than protecting the lives of Americans.
It's definitely in the public interest to know that.