President Trump signed an executive order that directed the Pentagon to develop a policy that would bar transgender people from serving in the military.