Why don't we want Autoencoders to perfectly represent their training data?
The only way an autoencoder can to perfectly represent the training data is by having a hidden layer that is the same size as the input and output layer. Thus, there would be no compression of the training data. The data would be its own model (i.e., f and g are identity functions). 

The goal of an autoencoder is to learn a compressed, lossy model of the data.