The significance is that Ernest is a name and Earnest is synonymous with honest. The girl wants to marry someone who is called Ernest because she believes it is a great name. However, in order to be close to her, the men have to be earnest too, but they are lying about their names so they're not being earnest, or Ernest, but are pretending to be Ernest and earnest.