Because backpropagation must flow through data. From you loss, error propagates through all operations you do. It goes though ground-truth, then lets say activation layer and so on. Threshold is connected to nowhere. You are using one loss or another depending on that parameter, but the network does not know that since it does not numerically modify the output/loss in any way.
It’s as if you see a bifurcation in a path, you can choose one branch or the other following an indicator, but you never walk over indicator itself.
The closest thing you can do is trying to add a layer multiplied by the learnable parameter such that it enables or chooses by activating or modifiying data.