It's mainly there as a form of farm subsidy that bypasses restrictions thrown up by long-existing trade agreements. Canada provides no farm subsidies besides underwriting crop and moisture insurance premiums to an extent, but the US has a long history of flouting these restrictions.
As usual. Coincidentally it provides money for equipment manufacturers and inputs providers like Deere and Cargill. But I'm sure that's just a happy coincidence of providing "food security".