I apoligize that I must take the long road with this answer as it really cuts to the central meaning of prophecy.
This is an excellent prophecy to show the nature and correct use of Biblical prophesy as interpreted by the ancients as well as show how thoroughly honest Christ fulfilled scriptural and traditional Rabbinic interpretations of them.'It is also noteworthy as the way all prophecy was and should be understood at times such as in this instance almost seems to contradict a modern critical interpretation. In the extreme of our misunderstanding it would almost seem that Mathew was using dishonest methods of exegesis that would not be acceptable today even if they were acceptable at the time.
In fact I believe this kind of misunderstanding even exists among some Christians who would say Mathew was not being fully sound, but that God was still using Mathew's erroneous methods to yet reveal new infallible and perfect truth through fallible means. However when we look at the case closer this would be the least probable conclusion.
First lets start by recognizing Mathew was appealing to a traditional Messianic expectation of Messiah. The general understanding of scripture throughout Israel's history saw its own history as prophetic. In this sense every major event in Jewish history was expected to repeat itself in the unfolding ever more glorious exaltation of Israel against its unclean Gentile enemies. As Israel was God's son who was rescued from Egypt and passed through the Red Sea in baptism, so Israel would be rescued from its exile into Babylon. For example when Jeremiah prophesies about the 'second exodus' from Babylon he build upon this 'prophetic history repeating itself:
“However, the days are coming,” declares the Lord, “when it will no longer be said, ‘As surely as the Lord lives, who brought the Israelites up out of Egypt,’ 15 but it will be said, ‘As surely as the Lord lives, who brought the Israelites up out of the land of the north and out of all the countries where he had banished them. ’ For I will restore them to the land I gave their ancestors. (Jeremiah 16:14-15, NIV)
Now just as the Exodus them was predicted to repeat in the Babylonian exile, so the Messiah was to be the ultimate deliverer and the ultimate fulfiller of the Exodus theme. The Jewish historian Alfred Edersheim documents this ancient Rabbinic expectation grounded in Psalms 2:7, which I quote in its entirety as it is so full of strong proofs showing Christ's fulfillment of not only the scriptures but of so many Messianic expectations as understood by ancient Rabbinic views. Of course the strong expectation that he raise Israel into a physical and literal mighty power and destroy the heathens was the one expectation Christ did not meet and the one expectation with greatest difficulty for even his own disciples.
Ps. 2:7 is quoted as Messianic in the Talmud, among a number of other Messianic quotations (Sukk. 52 a). There is a very remarkable passage in the Midrash on Ps. 2:7 (ed. Warsh. p. 5 a), in which the unity of Israel and the Messiah in prophetic vision seems clearly indicated. Tracing the ‘decree’ through the Law, the Prophets, and the Hagiographa, the first passage quoted is Exod. 4:22: ‘Israel is My first-born son;’ the second, from the Prophets, Is. 52:13: ‘Behold My servant shall deal prudently,’ and Is. 42:1: ‘Behold My servant, whom I uphold;’ the third, from the Hagiographa, Ps. 110:1: ‘The Lord said unto my Lord,’ and again, Ps. 2:7: ‘The Lord said unto Me, Thou art My Son,’ and yet this other saying (Dan. 7:13): ‘Behold, one like the Son of Man came with the clouds of heaven.’ Five lines further down, the same Midrash, in reference to the words ‘Thou art My Son,’ observes that, when that hour comes, God speaks to Him to make a new covenant, and thus He speaks: ‘This day have I begotten Thee’—this is the hour in which He becomes His Son. ( Alfred Edersheim's Life and Times of Jesus, Appendix 9)
Take clear note Messiah was to be God's Son in connection with Exodus 4:22 creating the Hosea 11 theme as a natural progression.
Having settled the 'prophetic history' and Messianic expectation that Messiah would be another leader of an Exodus we approach Mathew's use of Hosea to draw a parallel between the Exodus of Israel and the Exodus of the true and perfect Israel from Egypt, that is the Messiah. At this point we could almost stop and say 'yes, well no more explanation is necessary'. However a few more observations may more fully allow us to appreciate the solid logic and inspiration of Mathew.
Worth noting is that under this historical prophecy of Israel's history a prophecy was understood as having a higher meaning than the prophet in his own time. Only as the history of God unfolded his purposes over time did Israel's purpose and all prophecy achieve its full and matured meaning. In this sense Mathew is retrospectively recognizing the fuller fulfillment of what Hosea himself may or may not have perceived under the inspiration of the Spirit when seeing the prophetic vision. (Theologians vary from claiming the prophet would have understood nothing about future God intended meanings to claiming that under inspiration they saw much more than they could express and so resorted to hyperbolic attempts of communicating great mysteries that they could see, yet not fully comprehend in a kind of ecstatic experience of profound depth). Regardless of how much we imagine Hosea to comprehend of his own prophecy, Mathew in retrospect sees the fuller meaning and so in true Jewish fashion brings this out to the satisfaction of his Jewish audience.
One last point might be made, this fuller meaning of history is also sometimes referred to as an imbedded type, or deeper meaning of scripture and rather than just a retrospective understanding. This is often understood as a type when some level of understanding is also assumed to be had by the prophet himself, even if at a subconscious level. The question is then posed can we find this same 'hidden types' or was this the role only of the inspired writers to take note of the wider accomplishments of the histories and types of Israel? Can we use these same types and histories to gather expectations of the end-times for example? The answer to this question seems best to be understood as it was throughout history. Yes, of course we can but we must understand as we are not infallibly inspired as Hosea and Mathew, we may develop many proper understandings as did many Rabbinic expectations but we may also develop many foolish expectations as they also did. In this sense we must always account for the uncertainty of predicting future events from past shadows and types but know when they are fulfilled everything becomes clear as the shadows depart making their fulfillment all the more convincing as it unravels and decrypts a previous hidden mystery.
This is what Christ did on hundreds of points of unfolding history and prophetic types, making it simply miraculous and unrepeatable!