The Babylonian exile marks a turning point of the greatest significance in the history of the Jews. Not only was the native country lost together with political independence, but also, in consequence of the destruction of the Temple, the sole place of sacrificial worship, the center of the entire cult of Jahveh. Nevertheless the hope of the restoration was kept alive, resting as it did on God's word by the mouth of the prophet Jeremiah that the dominion of the Chaldees would last seventy years and that after the expiration of this period God would be found of His people and bring them back to their own land. Jer 25:11, 29:10 Dan 9:2 2 Chron 26:21 Ezra 1:1 The sole condition named by God was: "when ye shall search for Me with all your heart." Jer 29:13 Strack, p 8
Jewish diaspora communities (any Jewish community outside Israel) were direct consequence of deportations, beginning with deportations by Assyria. Babylonian deportations led to Jewish diaspora in Babylon (2 Kings 24–25), along the Khabur River (Ezekiel 3:15) and in Egypt (as refugees) (Jeremiah 42–44). Regarding Egypt, Jewish mercenaries had already settled Elephantine Island.
Before the exile, the Jews were connected to God by residing in the promised land, and worshipping at the Temple where God himself resided.
In the ancient world, prayer was not functional everywhere: it had to be in the presence of the divine. Yet after the exile, and with the Temple in ruins, this link with God appeared impossible. Then came Ezekiel, who was dealt a revelation by God himself. The vision itself meant that the divine was accessible out of Jerusalem; God had chosen to be with the exiles, not the Judeans who were still living in Jerusalem.
The vision dealt to Ezekiel outlined the laws of piety, how to have a bond with the divine through personal worship; and he also prophesied that the Jews would return to Jerusalem and the Temple would be resurrected. Ezekiel marked a new theological era.
How was the people to search for God? The pious were able to express their devotion to God neither by sacrifices nor by solemn worship in thronging assemblies. Naturally they would shun all manner of idolatry and the contact with idolaters; they would furthermore cultivate a scrupulous conduct which manifested itself likewise in works of love towards their neighbors. Then piety was exemplified on the one hand by keeping the Sabbath holy, and on the other by taking heed to the Word of God. ... The Word of God was at hand firstly in the prophetic message, whether in writing by the older prophets or in the spoken admonitions of the prophets of the exile; secondly ... in the will of God deposited in the pentateuchal Law. Strack, p 8
Like Ezekiel, P gave a consoling story. Had not God graced the Israelites even as they wandered the desert? God was not cemented into a building, but existed within the community, even the exilic community. The code set out by P was likely a popularization of the priestly class' esoteric laws, and he transformed stories of a literally impregnable Jerusalem fortress into homilies on the conflict between good and evil. Thus it was not necessary to have Jerusalem and the Temple; the Jews could become closer to God, following priestly conduct, wherever they were.
The Israelites had always held Yahweh as the only effective, meaningful God -- but with Second Isaiah came an unequivocal monotheism. Also, Second Isaiah trumpeted about a messianic age where a jewel-encrusted Jerusalem would reign over the world -- this would later lead to cognitive dissonance, when the rebuilt Jerusalem failed to impress.
Two considerations led the people to pay particular attention specifically to the [pentateuchal] Law. In the first place, they pondered over the reasons which brought down all the evil upon the nation, God's own elect people; and then again, there was the hope for the restoration of the whole cult and of political independence. Thus in the Babylonian exile the learning which had the Scripture for its basis arose. A contributory favorable cause in its development was the cessation of prophecy and the gradual suppression of the Hebrew speech, the language of the Law and other monuments of God's revelation aforetimes. Strack, p 8-9
Social justice had always been concomitant to the devotion to a holy place and to temple ritual: in the Canaanite myths, the Zion cult and the oracles of the prophets.
P goes further: there must be not only justice but love, and this compassion must also extend to people who do not belong to the House of Israel. The Goyim might be off Ezekiel's map of holiness, but they must be included in the ambit of Israel's love and concern.
You must love your neighbor as yourself. Levitius 19:18
It is a striking fact that these elaborate descriptions of the sanctuary, its liturgy, and the priesthood were evolved at a time when there was no hope of their being implemented. The Temple was in ruins, but the most creative exiles imagined it as a fully functioning institution and drew up an intricate body of legislation to regulate it. Armstrong, p 89
Babylonians conquered Jerusalem, executed some of the royal family and took others captive, and destroyed the temple. Some of the people were also deported, though the actual figures preserved in the biblical literature (eg, Jeremiah 52) suggest only a minority of the population. Those deported may have been some of the ablest and leading members of society, but the bulk of the population apparently remained in the land. ... Indications are that this community grew and expanded over time to become a significant Jewish population outside Palestine. Some of those returned in the early Persian period, but evidently the bulk of the deportees and their descendants remained in Babylonia. Grabbe, § 1 ¶ 2
Jerusalem was reduced to a desert wasteland, and the link to heaven was severed (Armstrong, p 79-82). Modern prayer can be held anywhere from a supermarket to a church.
However, ancient prayer had to be either held in or toward the deity's residence, a physical connection. Without a temple, it was impossible in the ancient world to contact the sacred, and the life-sustaining attachment to divinity was impossible. "By the rivers of Babylon we sat and wept when we remembered Zion" (Psalm 137). Yahweh had deserted his city and his people.
Poets described the Babylonian troops rushing the Temple courts, wrecking it with their axes. The Judeans and their disgraced god were a laughingstock. The vengeful exiled poets wrote of the Babylonians, "Happy is the one who seizes your infants and dashes them against the rocks" Psalm 137.
However, the Deuteronomists reconciled the loss of Jerusalem by elevating Mosaic law (Deuteronomy 6:7), making the sacred text its own shrine now that the Temple was destroyed.
They rejected the Near Eastern notion that a deity was indissolubly attached to a territory, an impregnable fortress, a Holy City. They followed Jeremiah's advice to integrate into Babylonia, and many found prosperity and court titles. Indeed, the King Jehoiachin lived at the Babylonian court and retain his royal titles.
Exile prompted the Deuteronomists to hold fast to and codify Jewish tradition such as circumcision, Sabbath time and kosher diet. Amidst the cosmopolitan Babylonian melting pot, the Deuteronomists made themselves distinct, other by virtue of their God. This is inextricable from the origins of Judaism as it is known today.