That isn't generally how legal restrictions on the use of real estate work. They're just part of the property.
Compare https://www.law.cornell.edu/wex/real_covenant :
> Real covenants affect the landowner’s property rights and “run with the land,” meaning that future owners of the property are bound by the covenant.
Since there's a covenant on this land, the current owners are bound by it, regardless of the terms of sale they thought they were getting.
The reason that restrictions on real estate work this way is pretty simple: ownership of real estate is tracked in a giant centralized registry, so arbitrary restrictions can be recorded there.
Is this a good idea as a policy matter? Absolutely not. But we have the law we have.