Does node_delete() function deletes the attached media files as well?
It depends.

If the file has no references left to it in the file_usage table, then yes, it will be deleted.

If there are remaining references, it won't be deleted.

Either way, file_delete() is definitely invoked for the file.