Canadian drug prices are cheaper because the Canadian government controls them.
In 1987 our northern neighbors created the Patented Medicine Prices Review Board. This entity reviews drug prices and, if it finds a price for a particular drug excessive, the board will not pay for it. Since Canada has a nationalized health care system, as a practical matter, this means Canadians can't access those drugs.
Many Americans may seek out cheaper prescription drugs in Canada, but many Canadians come to the United States to get the care and medicine their country's government won't pay for or won't provide promptly.
But if price controls are good enough for Canadians, why not Americans too?