If costs cross into unprofitability then that activity is ceased, but if they are still profitable they are done. The price Canada is willing to pay for American drugs is too low for our companies to invest time and money into R&D, failed products, legal, FDA, salespeople, ads, marketing, free samples, not to mention the stockholders. These costs must be borne by our market. If they aren't then their will be no new drugs. Period.
If our market pays those costs then companies have factories churning out pills for pennies, but they must be sold to cover the costs listed. If Canada comes knocking and offers to buy some pills for a few dollars they can because they get sales at prices near the margin. It's good business to sell to them.
Suppose Canada then starts undercutting the market by selling their newly bought drugs in the US. As a drug company what would you do. I know what I would do. I'd jack up the price 'til they quit buying, this market was profitable without them, and will be again. All these pols whining about laws that prohibit us from saving money by purchasing from Canada are either stupid or dishonest.
It is always amusing to me that most people accept that the laws of Math, Physics or Chemistry are strict and can't really be broken, but the laws of Economics can be changed to whatever we want them to be.
They are called the "Laws" of Economics for a reason.