Cookies
are most commonly baked until crisp or just long enough that they
remain soft .Cookies are made in a wide variety of styles, using an
array of ingredients including sugars, spices, chocolates, butter,
peanut butter, nuts etc..The softness of cookies depends on for how
long they are baked.

Whereas,
Cake is form of bread, or bread like food.

The
cookie in almost all its forms has abandoned water as a medium for
cohesion. Water in cakes serves to make the batter as thin as
possible, which allows the bubbles – responsible for a cake's
fluffiness – to better form.

Whereas,
In the cookie, the agent of cohesion has become some form of oil.
Oils, whether they be in the form of butter, egg yolks or vegetable
oils are much more viscous than water and evaporate freely at a much
higher temperature than water.

Thus
a cake made with butter or eggs instead of water is far denser after
removal from the oven.