Why do recipes often use ingredients of a similar color together?
Occasionally, sure. Green goddess dressing wouldn't be as much fun with tomato paste added, and strawberries would look awful embedded in blue Jell-O.

In general, though, recipes tend to derive their color almost entirely from one or two ingredients. A ragu Napoletano has a ton of ingredients of different colors, but the dominant color is red from the tomatoes and adding some more thyme isn't going to change that.

That's not to say that color isn't important to food. One reason a beurre blanc matches so well with white fish is because the light color implies a subtlety of flavor which works with the delicacy of the fish. Dark brown suggests more of a roasted, savory flavor; greenness suggests freshness; blue suggests artificiality. To a certain extent, these associations happened naturally rather than through developed convention, and as a consequence recipes will often have the "correct" color automatically. But it's common to adjust a recipe to perfect the color, particularly in this era of Instagram.

One thing you might notice is various green ingredients being close together in the recipe. That's not the green section, though -- it's the herb section, since the author chose to group the herbs together.