It looks like 3dcopy reads the .HEAD file into a header struct, changes the ID and writes it back out, but just copies the .BRIK file. Presumably the new header is incorporating the setting of AFNI_BYTEORDER, but this change isn't getting incorporated into the new .BRIK file. THD_write_datablock contains this comment:
/*---------------------------------------------------------------------*/
/*! Write an AFNI datablock to disk in the .HEAD/.BRIK format:
- Returns True if OK, False if an error.
- See also AFNI_refashion_dataset.
- All attributes must now be set prior to calling this,
via function THD_set_dataset_attributes().
- The one exception to the above rule is the BYTEORDER attribute.
-----------------------------------------------------------------------*/
Maybe write_brick needs to be checked earlier in this function?