If a customer wants cash then the check should be payable to the customer or to "cash." In the first case, the customer's endorsement on the back of the check is necessary. In the second, the customer's endorsement is not required by law, but definitely may be required by policy.
The customer makes a check payable to the bank when he wants the bank to keep the money; e.g. makes a loan payment. Ask your customer if he wants you to keep the money or give it back.