Dogs rub their snouts in cornflour due to pain or discomfort. They are trying to alleviate the pain because of the object stuck between their tooth or nose.