In honor of Rosh Hashana!
Anyway, I'm more of a modern history person, so this is going to assume that anything before the year 1000 CE didn't really exist. And note that this is basically me trying to sum up the ensuing 1000 years of Jewish history in a very very generalized way. But the bottom line is that for most of the last thousand or so years, Jews didn't necessarily have a choice but to remain a distinct people, and they also had a lot of internal connections keeping them together.
The key thing to understand is that the idea of secular or cultural Judaism is a pretty new one, one that was only really able to be created in an era in which secularism in general was an accepted approach to life as well as in an era in which Jews were emancipated. Jews were considered a cultural group, but they were really a religious group, a religious minority among religious majorities (generally either Christian or Muslim).
When Jews lived in a Christian-majority place, they were considered religiously inferior, which could manifest itself in a variety of different ways, whether a desire to convince them (or compel them) to convert or simply having them live among themselves in return for their positive financial contribution to their host society, whether through immense taxes or increased trade and commerce (often both). When Jews lived in a Muslim-majority place, they were considered dhimmi, a classification which automatically distinguished them from the majority and set them in their own separate group. In this sense, the Jews were made very clear of their difference- not necessarily in a negative sense, depending where they were and when, but it was still a fact of life. They were defined by their religious identities, and generally defined as inferior.
While conversion, whether compulsory or voluntary, to majority religions absolutely did happen, the overall existence of the Jewish community, which knew its own difference, remained. In some cases, those who were forced to convert were able to return; in other cases, they were lost to the Jewish people. Even voluntary conversion, over time, has had varying levels of "voluntary"- while in many cases it could truly be said to have been voluntary, in so many others there was immense social and religious pressure. In a way, it might make more sense to think of it as "what would the Jewish community have been like if there hadn't been efforts in Spain, in the Rhineland, in North Africa, in Russia, and the like to compel Jews to convert to other religions, not to mention to murder them en masse? Would Judaism be a stronger distinctive group?"
And, of course, in too many cases antisemitism was also a motivating factor- it's very easy to remember you're different, and to decide that you're unlikely to ever be seen as fully the same no matter what you do, when people hate you for your very difference. The cynical among Jews might (and often do) say that without antisemitism, where would the Jews be, which probably has more truth to it than can be comfortable.
But that's all external, and while it's relevant, let's talk about the internal.
No matter what those cynical Jews say, and no matter that there might be some truth to that comment, it's not fully true, or even mostly true. There is plenty to Judaism without antisemitism, without externally imposed differences. Judaism has had thriving scholarship, literature, and culture over the last millennium, and while perhaps those external pressures had focused it internally, it has been there nonetheless. Jews were united by practice, by belief, and by custom, across national boundaries, for hundreds of years. Jews shared a language (and often more than one), using it as an opportunity to create networks with each other that left the purely religious realm and traveled over to business and social connections. A book of poems, for example, that was written in Spain by Rabbi Judah Halevi in the 12th century might not long after be found in Egypt. A work of Jewish law written in Safed in the 16th century could be added on to by a rabbi in Poland only a few years later. Judaism's transnational identity was essential in good times and in bad- there were international ransoming networks throughout the medieval and early modern era in which communities in Italy would ransom captive Jews from Poland and from Morocco, and charity collecting networks on behalf of the poor in the Land of Israel that made their way as far as the Americas in the 18th century.
On a more local level, the Jewish community had its own internal structure, called the kehillah or the kahal. In some places in which Jews were expected to take care of themselves and their own, this was a completely all-encompassing internal structure, including all elements of social services, not just the synagogue. There were community records, community taxes (large chunks of which served to pay off the local ruler in gratitude for their permission for the Jews to reside there), community religious standards, and community charitable organizations. Communities had a community leader, often called the parnas, and they had a rabbi, who sometimes was his own seat of power and sometimes was absolutely in thrall to the community. From cradle to grave, a Jew was part of this Jewish community, to the extent that the threat of excommunication from it was a dire one.
It wasn't until the late 18th century that emancipation became a concept. Before it (and, honestly, even after it) Jews could attempt to blend in on a cultural level by achieving education and status, if they were fortunate enough to live in a place which allowed this; but they would still be seen as separate under the law. But even with the advent of emancipation, Jews still often felt at a disadvantage- anti-Jewish prejudices sometimes led Jews to convert to Christianity, for example, simply out of social pressure. Legal emancipation combined with the retention of antisemitic ideologies and influences led to Jews attempting to blend socially into society (often shedding religious observance to do so) and succeeding- up to a point.
And once Jews could, technically, be anything they wanted to be in the countries in which they lived, they wanted to be lots of different kinds of things. Many chose to leave the religious aspect of Judaism behind- but Judaism itself and the cultural legacy which it left proved a hard habit to break. Others chose to innovate religiously through a variety of movements, and others chose to innovate in a way which doubled down on what they saw as tradition. A mix of external pressures which made Jewish differences seem stark- such as seeing six million of their brethren brutally murdered entirely for who they happened to be born- combined with internal feelings of connection to one's heritage (and, for many Jews, the existence of a Jewish state) allow Jews to continue to feel and experience their Judaism to this day.