In shtetls, Jews had their own language of Yiddish, which bonded them together, and separated them from the surrounding towns.
Since the Jews were people with little amount of power, they did not make the laws, and as a result there was no legally and politically such thing as a shtetl. Moreover, the Polish commonwealth were the ones who actually owned the land where the shtetls sat, yet they would lease it to the Jews, but just to show them that they really owned it, the Polish would put Catholic churches in the middle of the shtetl marketplace. As history has shown repeatedly, when the general community does well, so do the Jews, and vise versa, and this is true now, for when Polish commonwealth collapsed, that was the end of stability inside the
shtetls.