Diagnosis
That means the internal clock/control board doesn't have a backup power source like a capacitor holding a charge. It's a common 'feature' on many basic models—the clock is volatile and needs constant power.
How to Fix It
There's no fix, only a workaround. If you want the clock to be correct, you'll have to reset it after any power interruption. Press the 'Clock' or 'Kitchen Timer' button, then use the number pad to enter the current time, followed by 'Start' or 'Clock' again to set it.
If That Didn't Work
If the clock resets even without a noticeable power flicker, you might have a loose neutral wire in your home's electrical connection, causing a brief dropout. That's an issue for an electrician to check.
Heads Up
This isn't a sign of a failing microwave. It's just a cost-saving design choice. Consider it a reminder that you had a minor power blip.