For decades HUD has given grants, with conditions. Called "CDBGs" for "Community Development Block Grants," they have tied federal money to meeting requirements for "low to moderate income" people in the community.
So communities were (and are) incentivized to meet certain types of agendas. Housing, single parents, and a variety of social agendas.
The same types of arrangements are used for edjucation, health care, energy, etc. Do what fedgov says=get money.
Failure to comply with the terms of the arrangements, jeopardizes the money, plain and simple. And that is one precedent for DOJ withholding funds.