He says that a person concealing such secrets woud really like to confess them. Such a person would feel so much better if they did.
But he says that people often do not want to confess even so. He says it might just be their personality. But it might also be that they want to be able to do good for their fellow man. They know that if their secret gets out, they'll never be taken seriously or allowed to help others again.
Of course, when Dimmesdale says these things, he is talking about himself and why he doesn't confess his secret.