In this case since it's deed restrictions as part of the land/building sale it's not the government enforcing these restrictions, it's plain old contract law.
On the flip side, without the government to enforce a contract one party has broken, there would be no reason to ever fulfill a contract - you'd have to rely on citizen's force, and history has not shown that it's been particularly good to rely on regular citizens.