They are primarily coming from neutron capture (electron + proton -> electron neutrino + neutron). During much of the collapse even these weakly-interacting neutrinos get trapped behind the high-density shock wave. As it expands and the density becomes lower, they escape in what's known as the neutronization burst.