Hamsters' behavior of hoarding food is quite common, and the main reasons are as follows:
Storing Food for Emergencies: Since the environment where hamsters live is rather monotonous and food is scarce, they choose to store food in their mouths whenever they get it. When food becomes scarce, hamsters can sustain themselves with the stored food.

Convenience: Storing food in their mouths is a very convenient behavior for hamsters. Their mouths are small, and it only takes a short while to store food in them. This saves energy, and they can access the stored food at any time.
Avoiding Competition: Hamsters are non - social animals and don't like sharing food with other animals. So, when they find their favorite food, they will quickly pick it up with their mouths and store it in their nests to avoid competing with other animals for food.
Methods of Dealing with Hamsters Hoarding Food:
Gently Massaging the Cheek Pouches: Use your hand to gently and slowly push forward from the end of the cheek pouch to help the hamster spit out the food. The movement must be gentle to avoid using excessive force.
Creating a Hot Environment: Put the hamster in a hot environment. The hamster will spit out the hoarded items to avoid heatstroke.
Scaring the Hamster: Scare the hamster. It may spit out the hoarded food due to nervousness.
Using Tools: You can carefully insert a cotton swab into both sides of the hamster's cheek pouch and gently touch the cheek pouch to help it spit out the food. But pay attention to controlling the force to avoid hurting the hamster.
Precautions:
Check the Cheek Pouches: Regularly check the hamster's cheek pouches to ensure they are dry and do not contain sticky, perishable, or sharp food to avoid cheek pouch inflammation.
Handle Gently: During the handling process, be extremely gentle to avoid injuring the hamster due to excessive force or improper operation.