It is well-known that Judaism does not actively proselytize, and even when prospective converts approach the beit din (the Jewish court), they are first discouraged from converting. Only after being told of the difficulties of life as a member of the Jewish community will the convert be accepted, once we are convinced that their desire to become a Jew is sincere. The Mishna on our daf discusses a not uncommon (but problematic) reason for conversion – a desire to marry. The Mishna teaches that someone who has a relationship with a non-Jewish woman should not marry her after she converts. Apparently, there is a concern that the conversion may have been done for the wrong reasons, which we would like to discourage. Nevertheless, if he does marry her, we do not obligate him to divorce her.
The Gemara points out that although we are uncomfortable with the idea that a convert will marry a person with whom he or she had a prior relationship, the Mishna appears to accept the conversion as valid. This is a clear rejection of the position that if a person converts because they see material advantages to being a member of the Jewish community (see, for example, Megillat Esther 8:17) their conversion is invalid.
The Nimukei Yosef and others explain that conversion is acceptable even if it was done for the wrong reasons because we assume that the person who converts truly accepts the requirements willingly, even if the process that brought them to convert was suspect. From the Rambam it appears that it is more of a technical question, and once a person has converted, we accept their present status quo state as a Jew.
The Gemara concludes by bringing a baraita that teaches that during the time that King David and King Solomon ruled, converts were not accepted, nor will they be in the days of the Messiah.