Exactly why recombination is so useful remains to be plumbed. Though we may not know exactly how recombination exerts its cleansing powers, we know that without it DNA rearrangements accumulate, genes decay, and useless bits of DNA amplify. Mostly, cells scrupulously guard genetic integrity, but when DNA becomes useless, repetitive and devoid of genes, cells can toss it out without suffering any damage. The mammalian Y is so degenerate that until recently many researchers believed that it did nothing except determine sex. To balance dosage of gene products, it benefits the male to amplify expression of X-linked genes.
Fruit flies stop at that to achieve dosage compensation.
Mammals have gone one step further. Expression from the X was probably amplified in both males and females. Then it became in the females' interest to inactivate one of the Xs. Such a question would probably be impossible to answer for mammals if the X and Y were fully differentiated as previously supposed. The genes that escape X inactivation were not considered evolutionary intermediates.