That factory generates Canadian profits, on which the company gets to defer U.S. tax until those profits are repatriated to the United States. (It does have to pay corporate tax to Canada on a current basis.) But it gets to deduct the interest it pays on that bond issuance currently, against its American taxes instead of its Canadian taxes.
FORBES: Good and Bad International Corporate Taxation