When link enters the moon in Majoras Mask, he meets moon children that each ask him Philosophical questions. The thing is that all of these questions seem to relate to Skull kid and what was going through his mind. Afterwords you fight Majora himself, along with the masks that those children wore.
My theory is this: Link never actually enters the moon. He actually simply put on the mask.
Majora tries to possess Link in the same way that he possessed Skull Kid, trying to place all of the same doubts in his mind. Link is stronger than this, and doesn’t give in to the mask. He then uses the power of the mask to destroy the moon, as his willpower finally overcomes Majora.
If you got all of the masks, they aren’t actually physically turned in, rather they are being used as a reminder of what he’s fighting for. That’s what gives him the strength of the fierce deity mask.