Most justices seemed skeptical of the administration’s argument, despite Trump’s unprecedented appearance