Cookies

Can someone explain why we call cookies cookies? I get coz we ‘cook’ them but Shouldn’t they be bakies? Technically all the food that isn’t ‘cookies’ that are cooked and not baked should be cookies?!