People really are writing tokens with custom transfer functions that do this sort of thing. The main use case seems to be allowing artists to collect fees on non-first sales of an NFT. This whole genre of program is a bit suspect to me though, because if you had a trusted counterparty or an escrow you could just sell them the private key for the account containing the NFT, and they could conduct a "sale" for $1 to their own wallet.
That is what I meant by the value being enforced by the courts: the artist could cheat me by selling my “exclusive” purchase again or in different locations, I could cheat them by making copies elsewhere or hiding part of the transaction, etc. and in each case the remedy is a court case just as with a normal contract making the same claim — the difference is that I don’t need to pay to maintain an expensive IT operation as well.
NFTs that point to particular IPFS proxies or that point to IPFS files that nobody pins are not a great start. There are technical solutions to this problem, like using Arweave instead.