This is mainly because when we make food for ourselves, we get desensitized to the smell, and a large part of tasting is actually smelling.
So when you make food for yourself and eat it, it's similar to tasting without smelling.
When someone else does the cooking for you, ideally when you're in another room where you can't smell it, the result is different.
When you walk in to have your food, you get to smell and taste it at the same time, so it tastes better to you. The same principle applies to eating leftovers.
Have you ever heard someone say that a certain food tastes better the next day? It's the same idea.
Typically, leftovers are preserved in the refrigerator, so they don't give off much of an aroma until heated. So there's actually a scientific explanation behind why your pizza tastes better the next day!