But Sen. Bernie Sanders of Vermont, who ran for the Democratic presidential nomination, said the deal negotiated with Carrier and United Technologies was not a punishment but a reward for a company that had intended to outsource its work.