Cooking causes certain chemical reactions within the food being cooked, many of which produce (and consume) compounds which have various flavours.
I don't know the real specifics, but I can outline why your two cases are different, and you can verify it visually. If you take a potato, cut it up and boil it, it stays pale. The texture changes to become much nicer to eat, and the flavour loses that raw starchiness that raw potato has (ever eaten raw potato? I don't recommend it...)
If you take that same potato (or, for realism's sake, a very similar potato) and cut it up and put it on a baking tray and put it in the oven to roast, what you get out has golden brown edges and a different texture, and a bit of a skin over the surface. Why? Ovens apply heat differently. Inside your oven is air at 200 degrees C or so. This is much hotter than the water in a saucepan (which caps out at 100C at sea level unless it's a pressure cooker). So the first potential difference is temperature - some reactions simply do not happen at the temperature you can achieve while boiling.
The second difference is the environment. If a reaction relies on one of the gases in the atmosphere to happen (chances are it's oxygen), this is not going to be the same when the food's submerged in water containing far less oxygen than the air does.
So when you roast your squash in the oven, you're allowing reactions to happen which cannot happen if you boil it, thus leading to different flavours. Particularly relevant is the Maillard reaction, which requires a kind of fat and sugar and lots and lots of heat, and happens when you brown meat in the frying pan, or in onions being roasted in a hot oven. It's a complicated business that has many different possible end products, some of which can then react further to make different ones again... read about it on Wikipedia if you're interested in the details. The point is that there is no way to get those flavour compounds at temperatures too low for the reaction to happen - Maillard requires about 155C, well over the boiling point of water at sea level. There's also caramelisation, which is a different flavour-producing reaction.
I guarantee that if you make two batches of soup, boiling one and roasting the other, you'll find that the roasted one tastes quite different. That doesn't mean you can't make nice soup by boiling raw vegetables (I've done it), but you can't make the same soup.
Some ingredients do not dissolve well in hot water - the starch swells and thickens, forming lumps that may have raw powder in them and are nasty. They need to be added to cold or lukewarm water and heated after they are dissolved. Other ingredients, most notably pasta, will partially dissolve in cold water making a thick gloppy soup. But if you add them to hot water they will "seal" (in a way) and stay together as they cook.
Best Answer
Really, this is just to even out cooking times for vegetables that don't have a surface area to volume ratio consistent with the other things you're stir-frying. If you were to shred those green beans, as is sometimes done, you could put them in at the same time as raw, julienned carrots, and they would finish at the same time.
If you put them in whole, you'll end up with beans that are burned on the outside and raw on the inside, as there's not enough time for the heat to penetrate to the center of the bean before the outside burns. Or, if you fry at a lower heat, you could get the beans cooked, but would have to add the carrots later (which means a lower temperature, too, since the beans are dragging heat out of your pan) in order to have them not turn to mush.