Morgan Stanley interview question

Why hashcode is used in HasMap?