Why is this derivation of the unit step function in the Z-domain valid?
Here is one way to look at it.

If you consider your derived expression as a transfer function in z $$\frac{Y(z)}{X(z)}=\frac{z}{z-1}$$

you can rewrite in terms of the delay operator (1/z) as

$$\frac{Y(z)}{X(z)}=\frac{1}{1-z^{-1}}$$

then cross multiply to get the difference equation
$$y(k)-y(k-1)=x(k)$$
or
$$y(k)=x(k)+y(k-1)$$
To get the impulse response x(k)=1 for k=0 but zero for k >0

from which y(k)=1 for k>=0, zero elesewhere, aka the step function.