How does one become an Affiliate Professor? I've noticed that several faculty members (both in my institution and beyond) are affiliate professors in some other institutions (beside being a professor in their own institution, of course). What caught my attention is that the vast majority of them wasn't in any way affiliated with the institution prior to holding the affiliate professor title (the source are their biographies). Afterwards they naturally collaborate on a regular basis.

Example: The professor did their BSc and MSc at my university X, went to university A in the US for a PhD, returned to my institution X (where they are now) and became assistant professor but in the same year became an Affiliate Professor at university B.

So, how does one become an Affiliate Professor?
A wide range of "Affiliate" and "Visiting" titles are often used to simplify bureaucracy in a long-duration academic interaction.  For example, you may have a collaborator who frequently visits, and want to give them access to buildings, networks, and other resources so that their visits are less of a hassle for everybody.  A "Research Affiliate" or "Affiliate Professor" or such status allows the institution to officially put the person into the system so that they can be issued keys, ID cards, access permissions, etc.

The mechanism for actually doing this is typically that a sponsoring professor just calls the appropriate department or fills out a form, and it just happens.