The ending of “The Magic Barrel” demonstrates a couple of lessons. First of all, love is not always redemptive. At the end, Leo marries the girl Stella because, “he pictured, in her, his own redemption” and she might love him. Leo has proven to be very shallow throughout the story, wanting to marry only pretty and young girls. Leo begins to hate himself, and realizes how bad he sounds. When he realizes what Stella is (a prostitute), he still decides to marry her. He is marrying her because of her checkered past, not in spite of it.
Another lesson is that religion should not be used as a crutch. Leo uses the fact that he is going to be a rabbi and it will be easier to get a congregation if he is married as a reason to go with the matchmaker instead of doing the difficult work of love.
They had made, if not a financially profitable marriage…at least a successful one in the sense of their everlasting devotion to each other.
Leo seems to think that this is what will happen for him. In the end, although Stella might love him, he marries her because he thinks it will redeem her and in redeeming her it will redeem him.