President Donald Trump says protecting national security gives him the authority to end collective bargaining with labor unions across most of the federal government.