And since this never comes up until we're dealing with the romance with alistair factor (as far as I remember) then it's just another thing they added in at that point - a reason that will be used to dump HNF if conditions aren't met to keep him from not caring about it. It's reminiscent of the death catch with the archdemon and how we do not find out until we're in Redcliffe again. We don't find out during the landsmeet which would be a logical place to learn about this if alistair doesn't take off loghain's head after the fight.
I see it as nonsense thrown in for game mechanics as there is no reason for it to be lore. This stuff was relevant and yet it's kept from you until last minute. Now they're just doing what they want for game mechanics with no real logic behind it. In fact, if you can live for 3 decades then you damn well can have children. Logic there is more flawed. You are strong enough to survive the joining and be a warrior for the grey wardens and live for another 30 years with this taint, but in the first few years you aren't able to produce a child? Makes no sense at all. Really, it just doesn't. It's like asking us to shelve basic common sense, something this game does far too often in my opinion.
While I cannot pin-point it myself, I picked up that 'stair himself mentions the topic in dialogue, well before then. So no, it certainly does not come out of nowhere. Besides, don't forget that Mr Cousland's ticket to the throne, Anora, may very well be barren herself, so no founding a dynastic line for him either. 
Ultimately, sterility does not equal general health, nor are children a necessity for a healthy relationship, are they now. Besides, why the writers themselves would wish to leave themselves some room as to which dynasty may come to rule Ferelden in the future should be quite clear. If the next we directly see of Ferelden will indeed be that far down the line, 30 years is still quite a long time to rule..