Paul's collection for the Jerusalem church occupies significant portions of his letters (1 Cor 16:1–4; 2 Cor 8:1–9:15; Rom 15:14–32). It is so important to Paul he is willing to face hostility (Romans 15:30-31) and is indeed arrested in Jerusalem in part because of it (Acts 24:17). What compelled Paul to raise funds among his gentile converts for the poor in Jerusalem? Why did he feel this money would be better spent on the Jerusalem poor than on the poor gentiles surrounding the communities where he collected it? What did he hope this offering would accomplish?
An alternative explanation could just be rooted in practicality.
The pattern had already been established by the Antiochene church in Acts 11:27-30. Agabus predicted an imminent famine and the church in Antioch. There were many famines during Claudius's reign (41-54), the most severe of which occurred in Judea around 46-47.
Because of the imminent threat, the Antiochene church acts quickly to meet these needs. The Judean famine of 46-47 is the most likely referent for the famine that Agabus predicted, though the church in Antioch would not have been in any better position to assist the main church of Jerusalem. There is evidence of a severe crop failure in Egypt around A.D. 45-46, though it is not directly documented. However, the hallmarks of the results of such a failure and famine occurred, including mass people migration, and large spikes in default on debt and taxes in the years immediately following this failure.
It was a common practice for the rich to take responsibility for ensuring the grain supply in times of shortage. Therefore, an expected practice for the Antioch community would have been for the leadership to develop a list of the wealthiest Christians in the city, and call on them for support. However, the church responded as a unified body, not relying upon the most wealthy to aid the church in Jerusalem, effectively placing the responsibility of benefaction upon all Christians, and not just the wealthy. It should be noted, though, that the response was by ability, of which the wealthy would have had more.
It is not inconceivable that Paul was also taking a collection for a greater need in Jerusalem than in the surrounding communities. It also would have shown solidarity with the main church in Jerusalem. Overall, it seems like the pattern of generosity (especially internally) had been set by the Antiochene church. Helping others is not dictated by how much need there is in your immediate vicinity, but is a multifaceted expression of solidarity and shared faith.
Thus, to address the question of why not just let Jerusalem fend for itself because Paul's church plants had their own needs, perhaps the needs of the Achaean churches were less significant than those of the famine-struck region of Judea. It is important to note that questions of attempting to discern the motivations of people whom we cannot directly ask can lead to the wrong kind of speculation. We can attempt to find reasons and circumstances that may have led to the particular decision, but settling on a definitive response will lead to more arguing than should actually occur.
I personally prefer the above practical reason because it fits the chronology reasonably well and it makes sense to me. I'm also not sure there's any evidence of unmet needs in the Achaean/Macedonian churches.
Winter, Bruce W. "Acts and Food Shortages," in The Book of Acts in its Graeco-Roman Setting, ed. David W. J. Gill and Conrad Gempf, 59-78. Grand Rapids: Eerdmans, 1994.
One possibility is that it came out of the meeting in Jerusalem described in Galatians 2, where Paul writes:
If you read the rest of Galatians 2, Paul had a bit of a falling out with the Jerusalem church, it could be that this made him even more interested in holding up his end of the bargain in an attempt to reconcile.
In short, Paul sees his outreach to the Gentiles as a ministry to Israel (Romans 11:12-15). God promised Abraham that in his seed all the nations (Gentiles) of the world would be blessed (Genesis 22:18; Galatians 3:15). And Isaiah prophesied
Paul's understands his ministry and particularly this offering as a fulfillment of God's promises. Through this offering the Gentiles are journeying to Jerusalem to worship the God of Israel and in so doing offering themselves as proof to the Jews that Jesus is the one Christians claim him to be.
In Galatians, the origins of the offering appears as a important bridge between Paul's Gentile ministry and Peter, James and John's ministry to the Jews. To see this we need to understand the context in which the mention of an offering first appears.
Paul wrote Galatians to defend against Jewish Christians who taught that Gentile believers in Jesus needed to follow the traditions of the Jews. Paul is resolute in his hostility to such a doctrine, eternally condemning any who preach a message other than the one he delivered to them (Galatians 1:8-9). To give context to his opposition, Paul recounts his own history; his former zeal for these traditions, his conversion and his subsequent relationship with the Jerusalem church who are presumably the source of the present conflict.
Paul claims to initailly have been extremely zealous for the traditions of his fathers, alluding to God's commendation of Phineius who killed an Israelite man in the very act of fornicating with a Gentile woman (Numbers 25:1-8). But a revelation of Jesus and Paul's call to the Gentiles changes all that. Without consulting anyone (once again presumably leaders in Jerusalem), Paul journeys to Arabia (2:17) and possibly even Mt. Sinai (4:25). Its only three years later that Paul briefly meets some of the apostles, Peter and James, in Jerusalem. In all this Paul stresses that his message came from God and not from any man.
14 years pass before Paul feels compelled to consult with these leaders in Jerusalem again. Paul presents the message he preaches among the Gentiles privately to them in the hope that they will see it from his point of view. Peter and James agree that they should go to the Jews and Paul should continue his outreach among the Gentiles. The one thing they ask is that he "continue to remember the poor."
This last phrase, "continue to remember the poor," appears to refer specifically to the poor in Jerusalem. Paul gives ample evidence to a serious tension that existed between Jewish Christians in Jerusalem and his ministry among the Gentiles. That this meeting and agreement occurred "in private" likewise suggests that Peter and James felt apprehensive in giving Paul the right hand of fellowship. A financial offering from Paul and his Gentile converts would certainly help to smooth out any difficulty that might develop among the believers in Jerusalem.
There are also other reasons to see this phrase as a reference to the poor in Jerusalem.
Paul's commitment to the poor in Jerusalem does not originate with Peter and James. It's an idea which appears to be fundamental to his understanding of his ministry among the Gentiles. This can been seen in his letter to the Romans.
Scholars are apt to point out that Paul wrote to the Romans to prepare for a further missionary trip to spain (Romans 15:23-24). But what we often overlook is that Paul's occasion for writing is more immediately connected with his journey to Jerusalem where he will finally deliver this gentile offering. (Romans 15:26-32). And it apparently weighs heavily on his mind (Romans 15:31).
Read in this light, the theme of Jew and Gentile makes a great deal more sense. Romans is a meditation on Paul's gospel and what he hopes to achieve through his ministry to the gentiles. In Romans 11:13-14 Paul states
It appears highly likely that Paul saw this arousal as coming from the prophetic fulfillment of a later day worship of God among the Gentiles.
No church was a stranger to persecution at this time, but it was especially severe and long lasting in Jerusalem. Here and here. I think it is to be expected that wide spread poverty among the church would be one of the many side effects of this persecution.
On Pentecost the Apostle Peter alluded to the apocalyptic great and terrible Day of the Lord in Acts 2:17-21. Later in the same chapter the believers in Jerusalem started divesting themselves of all their worldly goods (Acts 2:45). For those who were not sincere in their personal sacrifice and who dissembled (Ananias and Sapphira), the discipline was immediate death which caused "great fear" in the Jerusalem church (Acts 5:11). Thus the believers in Jerusalem disenfranchised themselves of their worldly possessions while there were still yet others who later had their worldly possessions seized from them (Hebrews 10:34). The result was the abject material poverty of these Jewish believers. The Apostle Paul therefore sought to minister to their economic needs through the love of the church from other geographic areas.