Well, if you take a look at the indentation of the code, which is correct, it should be pretty clear, why it is so.
if (is_page('mounting-guides')):
$guides = get_field('guide_pdfs');
// you don't do anything in this case
elseif (is_page('user-manuals')):
$guides = get_field('user_manual_pdfs');
// you don't do anything in this case
elseif (is_page('cleaning-guides')):
$guides = get_field('cleaning_guide_pdfs');
// this check is done only if you're on page 'cleaning-guides'
if ($guides):
// Do stuff
endif;
If you want to “do stuff” for all of these pages, it should be like this:
if (is_page('mounting-guides')):
$guides = get_field('guide_pdfs');
elseif (is_page('user-manuals')):
$guides = get_field('user_manual_pdfs');
elseif (is_page('cleaning-guides')):
$guides = get_field('cleaning_guide_pdfs');
endif;
if ($guides):
// Do stuff
endif;
This way you set $guides
if one of conditions is true, and after all of these checks you check if this variable is set and “do stuff”.