Dynamic scoping is useful

Suppose parent thread spawns some child threads.

If parent thread exits, without terminating child thread, child thread might run indefinitely.

Is there a way to ensure if parent thread exits, child thread also exits?

In languages with dynamic scoping you can do so, since the scope in which a thread is spawned, is dynamic. This means that you can say if parent thread exits, kill child thread also.