The law, invalidated a day before it would have taken effect, barred movie theaters, restaurants and other venues from selling sugary drinks larger than 16 ounces. Convenience stores and grocers would not have been affected.
"Sugary drinks are the highest contributor of sugar in the diet, about 40 percent," said the city's lawyer, Fay Ng, arguing the ban was a lawful effort to address an obesity epidemic.
The beverage and restaurant industries challenged the law, and state Supreme Court Justice Milton Tingling in Manhattan struck it down. The judge ruled that the ban's loopholes made it arbitrary and capricious, and that it was improper for the mayor's health board to pass it without city council approval.
On Tuesday, the state Supreme Court's Appellate Division heard arguments in the city's appeal.
It was not known when the court would rule. Bloomberg will leave office at the end of the year, and it remains an open question whether his successor will seek to impose the ban.
The four judges questioned Ng on the law's loopholes. Justice Dianne Renwick asked whether it made sense to allow 7-Eleven to sell a 20-ounce soda but not the deli next door. Justice David Friedman raised the specter of possible future rules such as restrictions on donuts.
Ng said the board had based the law on scientific evidence linking the empty calories of sugary drinks with obesity, and there was no reason to believe it would go further.
"The idea that the board of health would run amok...there's no basis for that," Ng said.
Richard Bress, a lawyer for plaintiff American Beverage Association, with members including The Coca-Cola Co, PepsiCo Inc and Dr Pepper Snapple Group Inc, said the board should not have bypassed the city council.
"For the first time, an agency was telling people how much of a safe and lawful beverage they could buy," he said. "When has an administrative agency crossed the line and started making policy for itself?"
Bress acknowledged that the city had provided evidence of a link between sugary drinks and obesity but argued that the ban would do little to address the problem.
Both sides have said the case could have implications for future mayors tackling public health issues such as obesity.
(Reporting by Joseph Ax; Editing by David Gregorio)