I first mentioned this on Bug 31161, since OpacHiddenItems can hide bib records too via OpacHiddenItemsHidesRecord. However, the actual mechanism for hiding the items is separate to hiding bib records, so I thought I'd explore this separately. The function to look at here is Koha::OAI::Server::Repository->get_biblio_marcxml()
Actually, it looks like C4::Biblio::EmbedItemsInMarcBiblio hides items using OpacHiddenItems, when called by C4::Biblio::GetMarcBiblio, which is called by Koha::OAI::Server::Repository->get_biblio_marcxml()