The relation is in memory, but it's not sorted. 'In Memory' doesn't mean the entire relation fits in the memory - it can be big. it only means that you can perform the next task right after the previous one (without disk access), aka pipelining.
Since the relation is not sorted like you need for the join, to sort it you must write it to the disk and read it again, and only then perform the join (which is now free, like you said).