Why would a government encourage consumers to ‘buy local’?

What impact would this have on the demand / supply diagram for these products?

How could this be considered a form of protectionism?

IB Economics: Why might a government introduce this together with certain price controls (such as a minimum price / Buffer stock programme)?