One of the reasons unions exist is to provide some sort of job protection for the members. If anyone can just join up, then the effectiveness is reduced. Having an entry bar also guarantees some level of experience to the employer, making the union an attractive hire, in theory.