There is absolutely nothing unusual about making an inheritance conditional on something else. Inheritances are often conditioned on the heir or beneficiary reaching a specific age or graduating from college.
What happens if a condition is controversial? Are there limits to the conditions that you can set?
There are certainly limits, however they vary a little from one state to another. Typically, you can not force anyone to do anything unlawful or inherently dangerous. What about making an inheritance conditional upon the heir getting wed. There does not appear to be excessive controversial about that. Nevertheless, what if the person does not wish to get married? What if he or she is homosexual and lives in a state that does not enable gay marriage.
The point is not to suggest that you must not leave conditional inheritances. You should talk to an attorney about the limits to the conditions you can set and the wisdom of setting conditions to manage somebody else’s habits.