Why did I have to coat my veggies with flour?
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.