The cashier asked everyone to sign when paying the salary to ensure the accuracy and legality of the salary payment. Signature is a way of confirmation and proof. By signing the payroll, each employee can confirm that they have received the corresponding salary amount and agree with the accuracy of the amount. This can prevent wage payment errors or disputes, and also help protect the rights and interests of employers and employees.