I think that you’re conflating “law” with “agreements” or “contracts”.
Most properly-written partnership agreements will contain a clause regarding disposition of partners’ equity in the business. That is, in a two-person operation, for example, the agreement will state how the business is to be valued in case of dissolution or in case one of the partners wants out, for whatever reason. It doesn’t have to be a falling-out among the partners, a partnership can be dissolved because one of the partners is unable or unwilling to continue in the business, or needs to cash out for other reasons.
There should be an equitable way for the two partners to agree on the value of the exiting partner’s share, and a method for the remaining partner to have a say in who his new partner will be, or whether there will be another one (or more) or not.
This is not to say that this “has to be”. Many partnerships are formed without formal agreements, and the business may be successful for a long time when one of the partners dies, becomes disabled, chooses to start a new venture for which he needs to come up with investment cash, etc. And assuming the business has been successful, there will be equity to tap – and as an owner of that equity, and without any other agreement (or law, if there is one – which I doubt) then he can seek the best return and sell to “whoever”.
Most people starting a business venture are at least competent enough to do planning for such basic facts of life, and hire attorneys to write up agreements to protect the interests of all partners and likely heirs.