This is a safety measure, and is to ensure your eyes are adjusted to the gloom enough to see the floor lights leading you to safety along the aisle in the event of a crash or emergency evacuation. If the cabin lights were on, but then went out your eyes would need a while to adjust to the lower light levels.