Right. In the disk method, the disk driver is performing at least a partial concatenation before actually writing to disk. The disk driver has more efficient code for concatenation than the code generated by Java (no surprise there) or Python.
Disk drivers don't know squat about concatenation. They just know about "write this block of memory to this chunk of disk blocks". Of course, what happens next will depend on whether the HD is buffered or whether it's not an HD but an SSD, etc.