Because in the scenario you outlined, the vectors always have size 0.
You reserve more space in the vectors, but you never resize them. (So your for-loop just triggers undefined behavior by writing past the end of the vectors)
push_back
grows the vector's size by 1, but if you don't call that, then you must call resize
and set the size explicitly. (or specify the size as a constructor argument)