There may be other reasons for this bias against non-Jews. The Jewish people were asked to help pay for the construction. They gave generously, so the prejudice may have had concern about who would receive the money or who would be responsible for how it was used. Only those Jews from Judea and Jerusalem gave money or valuables. Those from the Northern Kingdom were either not asked or had already refused. This may also relate to the way and reason the citizens of the Northern Kingdom became "lost." If their genealogies were not provable, they would have been excluded because they could not prove their bloodlines.
Chapter 1 of Ezra records the decree of Cyrus to send the Jews back to Judah and Jerusalem to begin reconstructing the walls of the city and the Temple. Cyrus made an inventory of items that were confiscated and brought to Persia and returned them as part of the reconstruct. He also ordered a census of the captives who wished to be part of the project.
Chapter 2 is a record of the Census and the gifts given to support the work. I will not repeat it here.
Chapter 3 reports the restoration of the sacrifices and the priests who conducted the services. Many wept when they saw the Temple foundation laid, but many others rejoiced. The sound of it carried far away.
Chapter 4 describes the opposition to the rebuilding from those who were still in the land, who had not been taken away. There were letters exchanged between this group of citizens and Artaxerxes who ruled in Samaria and the land West of the Euphrates. Artaxerxes supported the rebuilding and work was resumed.
Tattenai, governor of the region west of the Euphrates, challenged the authority to rebuild. The Jews who had not be deported resented the rebuilding efforts and were often counted as the enemies. Some of the enemies were settlers who were neither Jewish nor interested in the integrity of the county or restoration of a stable government.
Ezra oversaw the work and monitored the disputes between the opposing forces. In Chapter 4 Artaxerxes lent his support and the rebuilding was completed and sacrifice was resumed.