Why does the sum of two metrics give us a p-value above significance level but each metric viewed separately has p-value below significance level? Suppose that we have an AB test in which the individuals have been evenly split. We are measuring many variables simultaneously for each one of the individuals of this test (for example, X and Y). All the variables only take values >= 0.
When doing a T-test on X values, we obtain a p-value = 0.02 and when doing T-test on Y values we obtain a p-value = 0.0001.
However, when taking the variable Z = X+Y (which has an important and relevant meaning in our particular experiment), the T-test gives us a p-value of 0.46.
Why is this happening? Obviously, the p-value is not linear but I'd like to know the precise meaning of these results.
Thank you in advance for any help on this.

Possibly, and as a commenter was suggesting, there is some negative correlation between $X$ and $Y$. Another possibility is that they are correlated differently with the A and B groups themselves -- e.g., $X$ is higher in group A, but $Y$ is higher in group B. When you add them together, you are then in a way "averaging out" these effects.
I'm aware this answer is not super precise, but hopefully it gives some intuition as to what could be happening. One way to look into this would be to plot your data -- what does the distribution of $X$ (and $Y$) look like? Are they correlated? What do the distributions look like within each A/B group? What do the correlations look like within each group?
