Bernie Sanders’s surprising victory came after he contended that he was the only candidate who had opposed free trade agreements that led to U.S. job losses.