(a) That's right. The courts classify a wide range of agreements as illegal because they are contrary to a general notion of 'public policy'. Such agreements includes those that unreasonably restrict a person's freedom to work or engage in trade and commerce - known as agreements in restraint of trade.
It is important to notice that only unreasonable restrictions will be treated as illegal. It is not against the public interest to allow the protection of business interests by imposing reasonable restraints on persons who, in one way or another, have acquired information or skills which a competitor would value. So agreements in restraint of trade will be only be treated as void and unenforceable if they go beyond what is reasonably necessary to protect the legitimate interests of the other party. In the example, the extent of the restraint seems excessive, both as to its extent (the whole of Australia) and its length (20 years).