Certainly there isn't a good natural basis for the distinction. Why is it in baby showers, and for young children, we assign them those two colors specifically based on their sex? When did this start happening?
You might be interested in an answer I wrote recently:
To quote myself from last week:
However, as you may have heard, there was no concept of boy-colors vs. girl-colors, at least not to the extent that there is today. Some publications would recommend particular tones for each gender, while others contradicted them and yet others said there was no distinction to be made. You can find images of boys in blue and girls in pink, but also images of boys in pink and girls in blue and red and every other color. (Infants were generally dressed all in white.)
The shift from gender-neutral to strongly gender-coded clothing occurred, according to Jo Paoletti (Pink and Blue: Telling the Boys from the Girls in America), between 1890 and the baby boom after WWII. One part of this is economic: restricting certain colors (pink/blue) and styles (dresses) to a certain gender meant that hand-me-downs had a smaller audience. Where parents could have previously allowed each of their children to wear the same clothing up to age five or so and then purchased/made gendered clothing, with a sense that boys and girls should always be instantly recognizable, they now had to shell out for two sets of clothing from birth.
But there are also social reasons. In the first half of the 20th century, Western society was also facing a great deal of anxiety about sexuality and gender roles. This was a time when homosexuality as a concept began to be defended, gay people began to come out/have more visibility, and women started to become a greater share of the workforce and dress in ways that challenged certain norms of gender roles (shorter hair, trousers) and standards (showing more skin, wearing fewer layers). By lowering the age of gender differentiation and more rigidly defining the ways in which children performed/displayed gender, society "struck back" against these changes.