Hi, so I am no expert but I assume that this is an optimization decision. If you think about what the RELU operation (e.g max(0, x)) does to the gradients you will notice that for negative inputs, it kills the gradient (turns it to 0) and for positive inputs, it just lets it flow since dx/dx=1. So if you put the RELU first and there are a lot of negative gradients flowing you will just kill them all and save computation in the backward pass.
Either that or there is a bug in your code and Im just making this up . Anyways I am not sure about this so maybe someone else can clarify further.