User Password on Registration

When new users create their new profiles it gives them the option to create their own password. How come it still generates a random password then for users and emails it to them?