Great question squirbel, and glad to see peoples’ responses so far are generally on the right track.
First off, a clarification on a common misconception: memory for the time period between 30sec and 5min is actually Long-Term Memory (LTM), not Short-Term Memory (STM) as people usually think. There are certainly different aspects of LTM, hence the difference between a memory for something 5 minutes ago and something 5 years ago, but those are still LTM all the same.
STM, on the other hand, involves visual and auditory information for very brief time periods (in this case under 30 seconds, but 30 seconds is not necessarily a hard barrier between STM and LTM)—essentially, information is held in STM until it can be processed into LTM or discarded because it is deemed unimportant. For these reasons, modern memory literature usually foregoes the term STM and instead calls it Working Memory (WM).
Working memory has three main components: the visuospatial sketchpad, the phonological loop, and the central executive. The visuospatial sketchpad is the aspect of WM focused on visual and spatial information. You use this part of WM, for example, to conjure images and mentally manipulate objects. The phonological loop, on the other hand, is focused on auditory information. Lastly, the central executive serves multiple high-level roles, including unifying information from the other two sections together and helping determine whether information should be discarded or processed into LTM.
Now how does all this apply in the practical world? When you’re trying to remember a phone number, you’re holding it in the phonological loop. You repeat the phone number over and over to yourself until you get the chance to dial it on the phone. The average individual can hold 7 +/- 2 chunks of information in the phonological loop at once. (7 +/-2 means between 5 and 9.) This is actually one of the reasons phone numbers all around the world are very rarely longer than 6 or 7 digits. One digit doesn’t necessarily represent one chunk, however; a chunk is a small meaningful unit of information. Familiar area codes, for example, would usually count as one chunk even though they’re three digits. Likewise, remembering 383–1715 becomes seven chunks if you speak it to yourself as 7 digits, but five chunks if you say the last part as “seventeen fifteen”. As soon as you stop repeating the phone number to yourself, or once you get distracted and focus on something else, you’ll most likely lose whatever you had in the phonological loop (unless you decide to process it into LTM).
Reminding yourself to fill the cat bowl in the morning, but then forgetting, is not a problem with WM; instead, it results from not forming a robust encoding into LTM. And the truth is, this is a pretty efficient “error” for your mind: it won’t be particularly important in 20 years to remember that time you filled the cat bowl! In a sense, your central executive has already helped you deem this information as unimportant, and therefore marked it to be discarded. (This is a HUGE oversimplification, but let’s leave it at that for now.)
So is all for naught? Not at all. There are lots of strategies that can help memory with specific types of information. As you say, right before you walk out the door, an alarm bell sounds in your mind. Great! You’ve actually developed a strategy akin to a “mental checklist” that triggers every time you head for the door, and this checklist “reminds” you to feed the cat. If the “alarm bell” doesn’t go off every day, you can strengthen it, for example, by mentally imagining your cat hanging by its feet from your door handle. Sit for a minute and vividly imagine this very weird image: your cat, hanging from the door handle, by its feet. Why would a cat do that, it’s so weird? They wouldn’t, but now you have a very distinctive image associating your cat with the door handle. You’re now much more likely to think about your cat every time you reach for the door handle, and thus more likely to get your “alarm bell.”
There’s so much I’ve left out, but I think I’d better quit before this becomes a full-blown essay. I’m happy to answer any specific questions you’ve got. And since you’re probably wondering, my undergraduate and graduate degrees were in psychology, specifically focused on human memory and the ways in which we can screw up and “remember” things that never happened.