Well if you are saying that the contract is being broken, then yes it is. But what do you expect. Do you think that it will be a compiler error. If you think so than you are wrong.
The equals and hashCode contract is just a suggestion so that you can use your classes in Collections. If you don't follow the contract, you will not get any errors but will get unexpected outputs like you won't be able to find objects is hash based collections etc....
The "contract" about equals and hashCode is more than a "suggestion." What you are doing by implementing an equals() method which overrides the Object#equals(java.lang.Object) method is telling users (implicitly) that you are fulfilling the requirements stated there. And you don't want your classes going round telling fibs to their users, do you?
But you are correct that it is specifically used in Maps and Sets.