Why was fried rice invented?

Fried rice is made from cold rice that has already been cooked by boiling. The use of leftover rice and other leftover ingredients is common when cooked at home. Maybe not to waste rice left overs so they invented fried rice