There is no federal law or regulation that requires banks to cash checks for non-customers.
Most banks have policies that allow check cashing services only for account holders. If a bank agrees to cash a check for a non-customer, it may legally charge a fee.
These policies are intended to protect the banks and their customers from forgeries.
Once a bank cashes a check that has been forged by a non-customer, it may lose money if it cannot collect from the person who cashed the check.