Some of those singing the praises of cash back may be missing the point that it misleads the lender into lending too much. The lender ends up lending money for whatever the buyer wants to spend it on. Loans like that are risky and should bear a higher interest rate. Cash back is a way to get the lender to charge a low-risk rate for a high-risk loan without the lender’s knowledge or agreement.
I don’t know if it’s legal, but I would feel defrauded if I were the lender.