Hi Twahirwa,
I would say that the advantage of using this method, instead of files, is that actually you do not need to manage physical files for the import/export.
You can build the I_FILE in your code, and then call the API to perform the import/export, without having to create a file.
Hope it helps, best regards,
Alex