They can change object state, leading to retrieval issues.
Using mutable fields in equals and hashCode can cause objects to change state after being added to a collection, making them invisible. For example, in a HashMap, altering a key's mutable field changes its hashCode, making it unreachable in the map.
Additional Notes
Why avoid mutable fields in equals and hashCode?
Track: Java
Topic: Core Java
Focus: equals and hashCode in Collections
Topics:Core Javaequals and hashCode in CollectionsJava