Lenz’s law is a consequence of the law of conservations of :
Energy
According to Lenz law since electrical energy is produced so some other force must be doing some work which is converted into electrical energy.Hence it is a consequence of conservation of energy.