Why is blue associated with boys?

The whole Blue boy pink girl system we have currently is weird because historically Blue has been a fairly feminine colour associated with linking the water with the sea. Red has been the more masculine colour with fire, anger, power etc. so why had blue been the definitive colour for a baby boy? Shouldn’t it be red? And girls blue?
Why is blue associated with boys?
Post Opinion