Notice that hash("ABC") == hash("AAAC"). This means you have a collision.
When you have a collision, a hashmap then needs to check if the two strings are equal by comparing their actual values, a more costly computation. ("ABC" == "AAAC") --> is false.
The goal of a hashmap is to minimize collisions while keeping the size of the data structure relatively small, and allowing for O(1) access and insertion (unless a "rehash" is called).