that people are free to contract. Freedom of contract is a fundamental right in this country. If you draft the agreement yourself, as long as you clearly state your intent, and the other party is not under any kind of undue influence, duress, or fraud, and has the requisite mental capacity to make a contract, then most courts will upheld the contract as valid. Unless the contract is against public policy or illegal.
having a lawyer drafting the contract sometimes help if your contract is very long and complicated. there are many problems you might not have foreseen, such as what happens when one party dies, or if you two divorce, etc. lawyer can help you on that regard by drafting the contract. but if lawyer is involved, then the other party should also have an independent lawyer to review the contract, otherwise it might not be fair and might not be upheld later on.