Back in the medieval times, blue was considered a colour for girls.
This is due to the shawl of the Virgin Mary having been that colour. Blue was considered to denote the womanly virtues of obedience, penitence, devotion, and grace.
Pink, meanwhile, in belonging to the red family, was viewed a colour most appropriate for boys, presumably due to the redness of all the blood they’d be spilling as future knights and fighting men.
I mention this not to argue that pink isn’t truly as feminine a colour as it’s portrayed present-day, but rather to demonstrate that the practice of colour-coding by gender is by no means a modern phenomenon.
Although perhaps the opposition some feel towards it is.