A directive to revive two controversial oil pipelines awaited President Donald Trump’s signature on his first full business day at the White House. As he sat with union workers in the Roosevelt Room and the conversation turned to manufacturing, he raised his eyebrows in surprise when he learned the piping wasn’t made in America, according to people in the room.

Mr. Trump later told his aides to rewrite the order. By the next morning, his staff settled on language that compels his commerce secretary to draft a plan within six...