Why sweat but not brown?
Onions
The more you cook an onion, the sweeter it is going to get; heat breaks down the volatiles and complex starches and converts them to sugars.
When an onion is completely brown then it is basically caramelized.  The point of sweating onions is to draw out some of the pungency, but not all.  If you cook them 'til they're brown (caramelized) then they will be very sweet, and not really retain any of that sulfurous &quot;onion-y&quot; flavour at all.
So it's not really a question of how much you're developing the flavours, it's a question of which flavours you're developing.  The more sweetness you develop, the more of the original onion flavour you lose.
In my experience, caramelized onions are rarely used as an &quot;ingredient&quot; - they're more of a garnish or side dish, since they wouldn't really impart any significant flavour to the main dish.
Celery and other aromatics
These don't undergo the same drastic flavour changes that onions do, but the principle is the same:  You sweat them to draw out moisture and aromas without starting a Maillard or caramelization reaction.
The key is that sweating is a preparation step.  Yes, frying/sautéing these for longer would develop more flavour (or at least more of a certain kind of flavour), but you don't want to do that too early, since they're going to sit in the pan for a while longer; sweating means softening them up slightly without eliminating all of the aromas or the natural crunchy texture.
You generally don't brown vegetables during the preparation of a recipe; you only do that if you plan to eat them by themselves without any further cooking.  If you brown them, then continue to cook, you will turn them into mush and possibly burn them, and there's no way to fix it after that happens.