Why did I have to coat my veggies with flour? I made a corn chowder this evening containing corn, potatoes, onions, garlic, and some other good stuff. This particular recipe instructed me to add a little bit of flour once I softened the onions and garlic in butter and oil. The instructions specifically said to coat the veggies in flour before adding vegetable stock.

I understand the flour's role in thickening the chowder, but what's the reason for adding it at that stage? Would it not work as well if I added the flour after bringing the veggie stock to a boil, for example?
You already have mentioned the primary reason for adding the flour:  to thicken the chowder.

The author of this particular recipe has added it to the recipe while you are sauteeing the aromatics, I infer.  This creates, in essence, a quick roux, cooking some of the raw taste out of the flour, and helping ensure that you will not get lumps.

You could certainly thicken the chowder later with a flour slurry, for example, but this method is convenient and effective in this type of recipe.