It's down to parents and social influences (with the exception of children with SN or illness where there are other influences obvioulsy)
I am 3 months away from having a boy and have broached the subject of 'will he be a hell-raising, destructive, ball of energy' or 'will he be overly sensitive and easily picked on'. Not because I want to stereotype, but because I have no idea what he's going to be like and the toddler boys that I know (limited numbers admittedly) seem to fall into these categories.
Interesting to read other's experiences though and to realise that it isn't that simple and restricted. The same way that my daughter is more complex than just being obsessed with pink. She loved pink, but now blue is her favourite colour (over simplifying on my part but you catch my drift
). She spoke early, walked early, is top of her class, has a talent for singing and dancing and her favourite past time is giving me a heart attack as she leaps over obstacles and climbs the highest tree. She is also a grade A whinger but is sensitive and considerate and empathetic. All recognised and commented on by school (not the whinging - she saves that for home).
My point, she fits into some stereotyping but not all. Just like my limited number of toddler boys fit into some stereotypes (that I focused on initially) but upon closer inspection/me being more open minded about boys vs girls, they are equally as complex as DD or, less complex dependent on the child and their upbringing, parental influences and social influences.
So, in my less-than-knowledgeable experience, it is down to how we perceive boys and girls should act. We do it without realising, without conscious effort.
On a slight tangent - baby clothes. Pink, blue or white. It is driving me effing mad. I want to buy clothes for Boy but don't want him head to bloody toe in blue, exactly the same as I didn't want DD head to toe in pink. I don't mind some colour, but it would seem the main supermarkets/stores where I can afford to shop are Pink section - for all your baby girl could ever need. Blue section (with 1/4 of the choice!) for all your little "tyke/monster" could ever need.
Rarr. Browns, greens, orange.....purple (anything that doesn't show stains I suppose) where do you get non-blue boy clothes from?