When Ezra found out that many Jews had married Gentile wives, he prayed to God and asked God why he had been so good to them by letting these few people return from captivity even though they sinned by marrying Gentile wives. They did this before and God had punished them for it because it caused the people to worship other gods.