It's not. But a lawyer can't give money in exchange for client referrals. So SNAP can refer cases to Lawyer X and Lawyer X can donate to SNAP, but you have to keep these things separate. One article talked about an email that combined a referral with an inquiry about a donation, which puts you rather close to the line.

It's a hard thing to prove factually because people usually don't have an arrangement where, say, "For every case you refer me, I'll give you $100."

It's pretty much the same as donations to politicians: Exxon can give to Congressman X and Congressman X can vote the way Exxon wants, but X can't agree to vote that way *in exchange for* a donation.