California passed a statute prohibited private transfer fees unless used exclusively to support the encumbered property or cultural, education, charitable, recreational, environmental, conservation, or similar activities. Cal. Civ. Code §1098.6 (2018 Cal. Stat. ch. 306).
Note that the Federal Housing Finance Agency and the Federal Housing Administration are prohibited from dealing in mortgages on properties encumbered by covenants that do not provide a “direct benefit” to the real property encumbered by the covenant.12 C.F.R. §1228.1.