Why were the uniforms so colourful? The only practical example I can think of is some Russian troops who had green colours. Why did most armies not institute universal green, or a colour similar to the German's later feld grau?
You'll find some previous discussions on the topic of uniform colors in the archives, such as this discussion of 18th century armies. I'd also recommend taking a look at how battles were fought during this time. Trying to blend in with your surroundings was not a goal. Instead trying to appear like a large, uniform body that was clearly defined on the battle field was important.
As for the colors chosen themselves, most were picked because they were particularly cheap and/or colorfast. Madder red, a slightly more orange-red, was used for the regular troops in many armies. It comes from the root of the madder plant, is very inexpensive, and keeps its color decently. It will bleed out when wet onto lighter tones, like white, but they avoided this contacting most of the other clothing by lining the coats in other colors like white or blue. Officers wearing red usually were using a cochineal dyed red, much more of a scarlet. More expensive, but richer in color. The common blues come from indigo which is very colorfast and cheap, not being water soluble. Yellow comes from many sources, such as fustic, saffron, or turmeric. Between these three main colors most variations could be had, though there were dozens of other dyestuffs used for uniforms of different colors. Most of the visible coat textiles used were wool broadcloth, and many of the other pieces were wools like shalloon or serge, so they took dye well.
Sometimes the colors were chosen based on overall impact or the colors of the royal family. Other times it came down to availability, like with the Continental army of the American Revolution. It was literally a "lottery" of what colors they would receive for their coats. Some had the traditional blue and buff, but most couldn't get enough fabric in those colors. So, some groups were grey and pink, or green and yellow, etc. Overall, no one wants to show up to a battle in the same colors as the opposing force. Keeping track of who's who on the battlefield would be incredibly difficult. It's no different than sports teams today, the two-color system works very well and rarely do we end up with both parties having both colors.
As for the fashionable cut of the garments, they were simply keeping up with what was in style at the time. Uniforms have standards such as the number of buttons, types of fabric, collar style, etc. However, much is left to the tailor in terms of the cut and fit of the garment. While the average soldier is receiving a standard "size" garment that is expected to then be tailored to fit comfortably, European officers would be purchasing their own custom garments. The standards for the uniforms up-date every decade or two to adjust for larger fashion changes. There's just no reason for a tailor to make a waistcoat five or ten years behind fashion just because it's for the military.