Different food is made up of different types of atoms, obviously its going to affect you differently. Cake is bad for you because it has processes ingredients, saturated fats, lots of sugar etc... You're going to get like 1500 calories from a nice sized portion and not be able to eat anything for the rest of the day.