As long as the thing you promise to do (or refrain from doing) is something that you would otherwise have the legal right to do, it can be an enforceable contract term.
In this case, the buyer promises to refrain from selling their car in the first year–something they otherwise would have a legal right to do.
A contract for murder, on the other hand, would not be enforceable because there is no legal right to commit murder.
deleted by creator
Your country put regulations about contract law in their constitution?
Funny, I just watched HumancentiPad yesterday.
As long as the thing you promise to do (or refrain from doing) is something that you would otherwise have the legal right to do, it can be an enforceable contract term.
In this case, the buyer promises to refrain from selling their car in the first year–something they otherwise would have a legal right to do.
A contract for murder, on the other hand, would not be enforceable because there is no legal right to commit murder.