The degree of selfing has major impacts on adaptability and is often controlled by molecular mechanisms determining mating compatibility. Changes in compatibility systems are therefore important evolutionary events, but their underlying genomic mechanisms are often poorly understood. Fungi display frequent shifts in compatibility systems, and their small genomes facilitate elucidation of the mechanisms involved. In particular, linkage between the pre- and postmating compatibility loci has evolved repeatedly, increasing the odds of gamete compatibility under selfing. Here, we studied the mating-type chromosomes of two anther-smut fungi with unlinked mating-type loci despite a self-fertilization mating system. Segregation analyses and comparisons of high-quality genome assemblies revealed that these two species displayed linkage between mating-type loci and their respective centromeres. This arrangement renders the same improved odds of gamete compatibility as direct linkage of the two mating-type loci under the automictic mating (intratetrad selfing) of anther-smut fungi. Recombination cessation was found associated with a large inversion in only one of the four linkage events. The lack of trans-specific polymorphism at genes located in nonrecombining regions and linkage date estimates indicated that the events of recombination cessation occurred independently in the two sister species. Our study shows that natural selection can repeatedly lead to similar genomic patterns and phenotypes, and that different evolutionary paths can lead to distinct yet equally beneficial responses to selection. Our study further highlights that automixis and gene linkage to centromeres have important genetic and evolutionary consequences, while being poorly recognized despite being present in a broad range of taxa.