Preheating the oven matters. When you switch on the oven it will gradually heat up—climbing from room temperature all the way to the set heat. While this process can take between 10 to 15 minutes (which can feel like an eternity), it’s important to preheat your oven because most recipes are based on dishes being cooked at a set temperature.
Generally, baked goods with eggs and flour and dishes that cook quickly should definitely be put in a preheated oven. If you put in a dish too early—while the oven is still preheating—and follow the recipe, chances are that after the recommended time in the oven it won’t be cooked properly. Then you’re left to improvise and wait around to monitor when it’s done. This means you could run the risk of undercooking or burning your food.
More fragile baked goods like cakes or croissants can be completely ruined if they’re under- or overdone.