If you are trying to use builtin shadowmap comparisons (TEXTURE_COMPARE_MODE) then both functions are wrong because they are using incorrect sampler type and sampling instruction (the correct are sampler2DShadow and shadow2D(Proj)) so theirs results are undefined. This is likely what you are seeing. In the first case the hw will by accident get correct data (the depth coordinate from projection.z) to perform the comparison. (I assume that you have Nvidia cards which supports that comparison in hw).
If you really use ordinary textures, both functions should give the same result.
My guess is that he’s using VSMs and just looking for a sample from a depthmap for debugging purposes; or perhaps he’s trying to perform his own PCF. Heck, maybe he’s just rendering a spotlight and has a strange function naming convention, or he’s cleverly generalized his shadow and projective texture functionality.
Perhaps it’s something far more vexing
I guess we’ll never really know for sure until he’s good enough to volunteer with some more information.