Pasta, bread, cookies, sugar, grains are all refined carbs. These carbs are stripped of their fibrous parts.
Studies say that refined carbs can spike blood sugar rapidly and lead to hunger and cravings. This, in turn, leads to binge eating and therefore weight gain. Eating refined sugar is strongly linked with obesity, say studies.