A Mechanism for Producing Aligned Latent Spaces with Autoencoders