A preliminary injunction in federal court cited the First Amendment, handing a win to tech companies like Apple and Google.