When a question is deleted, this automatically deletes all answers as well. However, moderators are able to undelete answers, as I did for science here (screenshot for <10k users). This leads e.g. to the timeline and revision history of the answer being visible to all users, and the answer appears in search results as well. Does this have a particular use case (I can't think of one right now), or is it a bug?
Does this have a particular use case
If a moderator wants to ensure a particular answer always remains deleted (even in the event the question is undeleted), they would undelete the answer, then immediately delete it again. A mod-deleted answer cannot be undeleted by regular users.
A moderator might also do this on request see How can I delete an answer explicitly, even after the question has already been deleted, so it's not restored if the question is undeleted?
More generally, a moderator might undelete an answer briefly so they could perform an action (convert to comment, spam-delete) that requires the post to be not deleted at the time of the action, without also undeleting the host question.
There's another legitimate use case for this functionality.
Occasionally, a question with high-quality, useful answers needs to be deleted for moderation reasons (e.g. it was posted by a sockpuppet of a banned or suspended user, or some other rare cases like a particular extremely negatively-received feedback post here from 1.5 years ago). This feature can be used to preserve good-quality answers so that they're publicly visible, by allowing their revision history to be archived to the Wayback Machine.
There's also not much harm (to the database) that can be done with this feature. As I commented, there's an hourly script that deletes answers to deleted questions, so even if an answer to a deleted question is inappropriately restored, it'll get reversed.