For testing purposes I created a little unordered_set and tried to iterate over the set. The set holds an own class:
class Student {
private:
int matrNr;
They value type of a set is const K, and for a map it is pair; ditto for the unordered versions.
An iterator gives you access to value_type &, and a const-iterator to a const value_type &. As you can see, neither iterator type can "undo" the constness of the key.
The reason the key is immutable is that it forms an integral part of the underlying data structure; changing the key would require a non-trivial internal rearrangement which would cause all sorts of problems (e.g. non-zero computational complexity (for element access!), and confused iterator ordering).