The phrase "do the same" refers to what Mrs. Joe is doing with her cleanliness: making it more uncomfortable, although it should be theoretically better, than dirt. This is the same as how "some people" make their religion more uncomfortable than ungodliness.
I saw a quote recently which would be apt here; I don't remember the exact words, but it was about how religion should be used to improve yourself rather than to judge others. Another quote is also apt: "Men of God make everyone feel guilty and judged." This is the mindset that Dickens's "some people" refers to: the type of religious people who use their supposed piousness to make other people feel uncomfortable. Not all religious people are like this, of course, but they're frequent enough that you might have met some of them in real life.
Going back to the quote, it's describing Mrs. Joe's "uncomfortable cleanliness" by analogy with this sort of "uncomfortable godliness", using the common saying that Cleanliness is next to Godliness. Assuming that readers would know about the type of religious person who uses their godliness to make people feel uncomfortable, Dickens uses this familiar point of reference to clarify Mrs. Joe's approach to cleanliness.