What's the use of assigning foreign keys on MySQL
A foreign key is a type of constraint.  The purpose of constraints is to make sure that data in tables follows certain rules.  

You use foreign key constraints to ensure that child data has parent data.  You can use it to either prevent orphaning child records or to facilitate cascade deletes or updates.