That's not what banks should do. The banks do encourage everyone who presents a check to open an account to avoid paying the fees. That is an expensive compromise if the bank does not have checking or savings accounts that do not require a minimum balance and do not charge a monthly a fee. There are lots of reasons people don't want to keep their money in banks, some of them rational and some not. But banks do little to convince these people they are trustworthy when they levy taxes on cash equivalents, especially since banks don't run the same risks as check cashers.
Bank tellers can quickly determine if there is enough money in an account to cover a check.
These fees are just another way for banks to make money. As publicly traded companies, they are under pressure to keep profits up. Generating additional fee income helps the bottom line. It's also a way to prod consumers into using the services that cost banks the least. By encouraging people to avoid the lobby and use automated teller machines, the Internet and telephones, banks save money.