I was the Chief Compliance and Community Reinvestment Act Officer for the last bank I worked for. There is absolutely no requirement in the regulation that requires banks to make risky loans. The last five years I received an outstanding CRA rating. Employees volunteering in community focused groups qualify as CRA credit as does investments and loans to corporations or groups that support low to moderate income people. My bank made loans to housing authorities that not only qualified for CRA credit but the loans were solid and safe.
A lot of people say what you said that banks were required to make risky loans to meet CRA regulations. That is totally false. Even if a bank got unsatisfactory on it's CRA examination all that would happen is when the bank posted and published it's CRA examination it would show unsatisfactory. That is it nothing else happens. The examiners will encourage the bank to do better but there is nothing in the CRA regulations that calls for regulatory action or punishment. What may happen is the bank may lose public funds deposits. Housing Authorities look at CRA reports in deciding who they will bank with. Cities and Counties also do this. So a bank could lose public funds deposits and that could mean millions of dollars in deposits.
I need to add that a banks CRA rating is used as part of the approval process of the regulators when a bank wants to open a new branch or buy another bank. There are five things the regulators look at before a bank is allowed to expand and CRA is one of them of the 5 it is last in priority. Capital is number one.