Upon leaving the country you must submit the I-94 to the US Immigration in order for them to update their files with the date of your departure. You can give submit it to the airline checkin agent when you checkin your bags.
In the event that you forget to submit it, you will need to mail it in. Here’s further information in case you need to mail it in: How to return Form I-94