My school district implemented sexual harassment/etc. guidelines because of official "guidance" that said if we didn't do x, y, and z we might be investigated (something that is very intrusive and expensive, and a thorough-going investigation always shows up *something* since it's hard to be perfect ... the old 'show me the man and I'll show you the crime' sort of routine).
Same for student lunches. Asked if it would okay if I put one of my classes in for a free pizza-for-the-class drawing with a local business, I was told that this was illegal. That while a bag of chips might be an adequate reward for a student, "pizza" was a meal and would violate the federal dietary guidelines so it was a hard no on the free pizza.
Same for a lot of SpEd and "EB" (formerly "EL", formerly "ELL", formerly ...) education. It costs more than the feds pay for, but nobody wants to turn down "free money." Esp. because if we don't meet the SpEd and EB service levels, it's not just SpEd and EB monies that would be endangered but a whole raft of sub-programs that make up the DOE contribution.
The '70s saw highway funds threatened with withholding if states didn't lower their max speed limits to 55 mph.
My county was told that unless they produced an affordable-housing central planning document by a certain deadline they could have all sorts of funding withheld--and then that plan had to be approved with regular checks to make sure it was being followed.
Federal funds come with strings.