Having 2 Apple IDs on 1 device

iOS & iPadOS

Has anyone ever heard of someone having 2 Apple ID's on 1 iPhone? My friend has an iCloud account that stores her backup and then in her iTunes app store, she has a gmail account where all of her apps download too. If she did a restore, how could she sign back into both accounts again? Whoever set up her iPhone, did the 2 accounts. Or, could she have just her iCloud account for everything? What will happen if she signs out of her gmail account for the app store and uses her iCloud account for iCloud backups, iTunes, and app store? What will happen to all of the apps that she already downloaded?