The crypt function takes two arguments. The password, and the salt. To check the argument against the existing password in the pfile you have to crypt it and compare the crypted strings to see if they match.
The first two characters of the result of a crypt call will always be the first two characters of the salt. For example:
crypt( "temp", "Orion" );
This will result in a crypted string with 'Or' as the first two characters. This way you always know what the salt was. Why? Well, to put it simply, it makes things easier.
Say I started with a character named Arachnus. Ok, great. The salt is 'Ar'. Now, saw later down the road I change my name to Orion. If you crypt and use my current name as the salt for the argument, and compare it with the old password salted by Arachnus, then they won't match.
By calling crypt with the salt as ch->password (or whatever it is) you ensure that it uses the proper salt to compare against. Hope it helps.
Oh, I almost forgot. The salt helps to generate the password. Different salt, different result. Helps to randomize things.