I don’t see any reason that it would be doing that. Try echoing out the id as well and see if you are getting values for different attachments.
foreach ($attachments as $attachment) {
echo $attachment->ID,': ',get_field('custom-field-name', $attachment->ID),'<br />';
}