I have become aware of certain professions making it part of a partnership contract that if a partner leaves the partnership, they will not set up within a certain radius of where they were originally working.
Is this actually legal?
Yes, it's legal - it's enforcement can be questioned when the excluded region / excluded practice is so broad as to restrict the possibility of future employment*.
*I'm not a solicitor but have gotten advice on a similar clause in an employment contract.