Coupling of newborn ions to the solar wind by electromagnetic instabilities and their interaction with the bow shock