"Would" is a modal with many different uses.
One use is of "would" is for a habit in the past. But the sentence in question is not referring to a habit in the past.
See English Grammar in Use 4th edition by Raymond Murphy. (There is a PDF on the net.)
[excerpt from English Grammar in Use, Unit 36C, p. 72.]
You can also use "would" to talk about things that happened regularly in the past:
- When we were children, we lived by the sea. In summer, if the weather was fine, we would all get up early and go for a swim. (= we did this regularly)
Another use of "would" is for the future in the past. The sentence in question uses "would" this way.
See Practical English Usage 3rd edition by Michael Swan.
[excerpt from Practical English Usage, 3rd edition, p. 622]
section 4 - future in the past
"Would" is also used to express the idea of 'future in the past'- to talk about a past action which had not yet happened at the time are are talking about.
"In Berlin, he first met the woman whom he would one day marry."