A Bill Clinton-appointed federal judge in San Francisco ruled late Friday that the Trump administration broke the law when the Department of Homeland Security directed FEMA to slash its workforce roughly in half, a decision that hands another victory to federal unions and another setback to President Trump’s campaign to shrink a disaster agency he has long called wasteful, politicized, and overdue for reform.