Goldfish don't normally shed their scales. They sometimes lose scales due to skin infections, rough handling, banging against hard objects or attacks from other fish.
Goldfish rely on their scales and the protective slime coat growing on the scales to protect them against bacterial and fungal infections. If a goldfish shows signs of scale loss, look for possible causes. Remove hard objects and any aggressive tank mates. Treat infections with medication from a pet shop, or consult a veterinarian. Limit handling of the fish to prevent further damage. Relieve conditions that may contribute to infections by keeping the tank water clean, adding small amounts of aquarium salt, preventing overcrowding and feeding the goldfish good-quality fish food that is not corn based.