A salt is random data added to passwords before hashing to prevent rainbow table attacks. Using accountName as the salt ensures each user's hash is unique, even if passwords are identical. This approach makes pre-computed attacks infeasible while maintaining per-user uniqueness.