Difference between だけに and だけあって


Once again, while doing exercises, I came across a sentence that bugged me:

> 直子は７歳のときに家出したが、聡明な_____、見つかることなく10日間もひとりで生きていた。
>
> A. だけあって、B. だけに、C. だけ、D. だけは

The solution to the exercise was A, which makes sense to me; but why would B
be incorrect? As I understand it, both だけあって and だけに mean "precisely because"
(in this example, it bears the nuance that if not for her wit, Naoko would
have died). However, since they both appear as propositions, I guess there's a
nuance between them; unfortunately I could not find any reference about such a
nuance.

What's the difference between だけあって and だけに? What makes だけあって the right answer
here?




To my surprise, someone asked [exactly the same
thing](https://japanese.stackexchange.com/q/59577/7810) one year ago, but I'm
going to focus more on their difference.

They are a bit more nuanced than "precisely because" for each. Especially the
speaker's attitude is always woven into those expressions.

  * `XだけにY`: "considering how much X, (it's natural that / unavoidably / admittedly / I can't help but say) Y"
  * `XだけあってY`: "as can be expected of (how) X, Y"

だけあって comes from an idiom だけある "live up to the expectation that", so the
connection is very straight, saying that what happened (Y) is true to, and is
proof of the fact something has the quality (X). だけに is more convoluted if you
look at my translation. It just put how highly you expect of it and the actual
event side by side. It doesn't necessarily say Y is the expected outcome of X,
and even when it does, the baseline is that Y is "fair enough" for X, not that
it wouldn't be like otherwise. This mentality often leads to the impression
that Y is not expected or desirable without reserve to the speaker.

So purely grammatically, B can be also a right answer, so you could say it's
not a very good question. But I think 98% sober Japanese would choose A if
given no other context, in this sense the question is more or less valid.

