a vain effort for the person who prepared the question
How so? The person still gets the answer, it's just not directly attached to the question she posted.
a vain effort for the persons who answered this closed question
Not really; duplicate questions are often not deleted (see Do not delete good duplicates!), so they get to keep any votes and accept marks on their answers. The answers still exist, and can still be edited and continuously voted on.
If one of the answerers would really like to ensure that his post is not deleted in the case that the closed question is, the answer can be moved to the "master" question. The answerer can either flag to ask a moderator to merge the two questions, or he can manually delete and repost, after editing for specifics like variable names.