What makes a cakey or chewy cookie can be a variety of different reasons.  The miss measurement of any of the cookie ingredients will affect how the finished product will turn out.  Using too big or too small of an egg.  Not scraping the sides of the mixing bowl during the many stages of making will result in a cakey or chewy cookie.  Adding all the eggs at one time will result in a curdled looking cookie batter instead of a smooth, creamy texture batter.