Magnetic field origin in astrophysical jets