Eating the right stuff is at least a little important. Protein and unrefined carbohydrates are more effective at making us feel full than fat and refined carbohydrates.
Put simply, a 300 calorie cookie is less filling than a 300 calorie lean steak, so you're more likely to want to eat more after the cookie than after the steak.