You were querying the rule. And looked confused.
The rule is if you can count it, it's fewer, if you can't it's less.
So flour is less because you can't count it.
You can have fewer bananas for example as they come in units. But if you mashed up some banana and spread too much on your sandwich, you'd need less banana. And better sandwich fillings.
The measuring where flour is concerned is imposed by us and in units in which you can count.