I have a question regarding the concept of length contraction. Consider a rod of rest length $L_o=x_2-x_1$ in frame $S$. Now if we want to measure the length of the rod in $S^{'}$ i.e $L^{'}_o=x^{'}_2-x^{'}_1$ in this case we use the inverse Lorentz transformation.
My question is why must we take measurements $x^{'}_2$ and $x^{'}_1$ at the same time $t^{'}$ in the $S^{'}$ frame which is in uniform motion w.r.t the $S$ frame? Why can't we take the measurements of the end points $x^{'}_2$ and $x^{'}_1$ at different times in the $S^{'}$ frame?