It makes checking passwords safer without using the real password. Instead of keeping the real password, a "hash" of the key is kept and when checking the password, the "hash" of the real password is checked with the input. Some software put a limit on the length of a password and is sometimes used to make larger secret phrases smaller. KDFs are also made in a way so that, it takes a computer some effort to make the "hash". This makes making a list of potential combinations difficult.