Justices on Wednesday review whether ban was to protect, or to fulfill anti-Muslim campaign promise