For one thing, note that in Matthew 24:1-3, the question asked by the disciples directly follows a statement by Jesus declaring that the Temple would be entirely destroyed. In the question of the disciples in v. 3, the author of Matthew lumps together the parousia and the "end of the world" with the destruction of the Temple. The presumption is that the parousia and the "end of the world" would occur at the same time as the destruction of the Temple. This builds on the expectation of many Jews and Christians during the Jewish War of AD 66-70 that the war would lead to the defeat of the Romans and establishment of God's rule.
However the wording of the question in Matthew 24:3 is not the original one, since Matthew has taken much of his material from Mark (Markan priority), and there the question makes no reference to the parousia and the "end of the world": "Tell us, when is this going to happen [i.e. the destruction of the Temple], and what sign will there be that all this is about to be fulfilled". In response to this question, reference is made to the Jewish War (Mark 13:5-8) as part of the "beginning of the birth pangs," and explicit reference is made to a desecration of the Temple (v. 14) as occurring "in those days" in a time of great distress, but Jesus also mentions that other things were to happen too "in those days, after that time of distress", including cosmic signs (v. 24-25) and the "coming of the Son of Man in the clouds" in v. 26-27. There is no concept of a huge internal of time between the destruction of the Temple and the parousia, as the text explicitly states that "this generation" (that is, the generation of Jews who lived during Jesus' ministry) would not pass away before "all these things will have taken place" (v. 30), and that the time "has been shortened" (v. 20). Yet the end does not occur during the war itself because it is only the "beginning" of the birthpangs and "the end will not be yet" (v. 7), but at the same time the parousia was supposed to occur "in those days" (v. 18, 24). It is generally concluded from these data (along with other clues) that Mark was published very shortly after the destruction of Jerusalem, such as between AD 70-75.
Matthew, on the other hand, was written some time later, as evidenced by its use of Mark (see the literature for a detailed discussion of this, especially H. Koester's Early Christian Gospels) and various internal clues (I am not proposing any specific date, but the common ones tend to be between AD 80 and 100). By this time, the parousia and end had failed to materialize, and the apparent "delay" was a frequent concern of the sub-apostolic period (cf. James 5:7-8; 2 Peter 3:1-10; 1 John 2:18-19; Jude 17-18; Revelation; 1 Clement 23:1-5), and this concern is highly marked in Matthew while absent in Mark. Thus, the author has modified Mark's eschatological discourse by adding a series of parables (Matthew 24:37-25:30) that have as a theme the apparent delay of the parousia (cf. "My master is delaying" in 24:49), the need to stay awake for the later-than-expected arrival of the bridegroom (25:6), and that a period of time would elapse so that the money deposited with the bankers would accrue with interest (25:27). The special interest at the time in the delayed parousia and "end of the world" is thus reflected in the reworking of the disciples' question in 24:3: "Tell us, when is this going to happen [i.e. the destruction of the Temple], and what will be the sign of your coming and the end of the world?" What is more, the author also attempts to answer these questions in what are additions to the Markan text. Thus the sign itself is mentioned explicitly in v. 30: "And then (tote) the sign of the Son of Man will appear in heaven," a phrase absent in either Mark or Luke, and the time of the "end" is specified in v. 14: "This good news of the kingdom will be proclaimed to the whole world as a witness to all the nations, and then (tote) the end will come", again a phrase that is absent in the parallel passages in Mark 13:10 and Luke. Luke, on his part, indicates the delay independently in other ways. He leaves the disciples' question from Mark unchanged (cf. Luke 21:7), explicitly indicates that the "signs" will appear "in the sun and moon and stars" (v. 25, Mark does not indicate what are to be "signs," while Matthew refers to the "sign of the Son of Man in heaven"), and inserts a condemnation of those who had said "The time is near at hand" (v. 8) when in fact it wasn't (this phrase is absent in Mark 13:5-6 and Matthew 24:5, 26). Luke also utilizes many of the same eschatological parables as Matthew but inserts them elsewhere in the gospel instead of in the eschatological discourse.
So in short, the original version of the question related only to the destruction of the Temple and Jesus' answer implicitly linked it with the war and the future parousia and end, whereas Matthew has modified the question to explicitly refer to the parousia and end so that Jesus in his reply could treat these events as well and explain that they are coming soon even though they do not occur at the same time as the Roman destruction of the Temple. That is, Jesus' response is directed to those who, like the disciples asking the question, had lumped together the "end of the world" and parousia with the destruction of the Temple and had expected all three to occur in connected fashion.