Prior to sowing rice

Prior to sowing rice, a legume crop was cultivated and ploughed back in the field, why?

Leguminous plants possess root nodules in which the symbiotic bacteria, Rhizobium, fix
nitrogen. The fixed nitrogen makes the soil rich in nitrogen when the leguminous crop is ploughed back in the field.