Yeah, Eloquent takes care of this, but with a join, you connect based on the database table and not based on the model. So in this case Eloquent doesn't know it needs to exclude the soft-deleted records.
Note that Eloquent is here for 90% of the most common cases. This is an edge case. You should just add the extra whereNull('files.deleted_at') in this case to make it work ;)
There are alternatives using relationships, but that is something different than using a join of course.