I was looking into neutron star creation and I read that when a star dies, it expells its outer atmosphere and leaves behind a really small really dense nucleus (a white dwarf if the first star was a red giant, or a neutron star if the first was a white dwarf). But why does some of the mass get ejected and some left behind? Which is the process that ejects the mass?
Also, why is electron degeneracy pressure bigger than neutron degeneracy pressure? Why is it that the electron pressure is the first "barrier" against gravitational collapse and only after it's the neutron pressure's turn?