Pass KS Test Fail Z Score Test Im working with some messy data and was comparing two data sets. I used both the KS test and the Z-Score
I found instances where Means would be found to be different under the Z score test but the distributions would be the same under the KS test.
Can anyone provide some theoretical reasons why this may have occurred. I probably violated an assumption of the tests at some point but I'm pretty unfamiliar with the KS test

KS is a general test of distribution equality, capable of detecting lots of differences (means, variances, etc) but not specializing in any in particular.
Z is a specialist, better than KS at detecting differences in mean but incapable of detecting much else.
By analogy, all you did was have Dr. KS refer you to a specialist.
EDIT
Note that “passing” a hypothesis test is nonsense. Hypothesis tests result in “reject” and “fail to reject”, not “reject” and “accept”. I suspect you know this and just were loose with the terminology, but it’s important to sort out in your head why the two are different.
