Hello! Double heterostructures are used in LEDs and lasers to provide both the confinement of the charge carriers and the confinement of the generated light. This image is a comparison between a homojunction and a heterojunction. As regards the unbiased junctions, when the n region and the p region come into contact, the electrons of the n region diffuse in the p region despite the higher energy values of the conduction band. Heterojunctions are built to confine the charge carriers; the central region (which will be the active region) has the conduction band limit which is lower than the conduction band of the left and right regions; the valence band limit is instead higher than the "neighbour". In the image, an electron from the right region could diffuse into the central one; but what can certainly prevent the electrons to diffuse from the central region to the left one, "climbing" and following the conduction band? In a pn traditional junction, electrons can climb bands as written before; why should this case be different?