We report a 3D magnetohydrodynamics simulation that studies the formation of dipolarization fronts during magnetotail reconnection. The crucial new feature uncovered in the present 3D simulation is that the process of reconnection produces flux ropes developing within the reconnection region. These flux ropes are unstable to the kink mode and introduce a spontaneous structure in the dawn-dusk direction. The dipolarization fronts forming downstream of reconnection are strongly affected by the kinking ropes. At the fronts, a density gradient is present with opposite direction to that of the acceleration field and leads to an interchange instability. We present evidence for a causal link where the perturbations of the kinking flux ropes with their natural and well defined scales drive and select the scales for the interchange mode in the dipolarization fronts. The results of the simulation are validated against measured structures observed by the THEMIS mission.