The key idea here is that the rows of a matrix constitute a linear system of equations.
Since we have 3 equations and 5 unknowns (columns), our system has an infinitum of solutions, because we could choose two variables to be whatever we want.
It is somewhat an arbitrary rule that mathematicians always choose to say that the pivot entries are bound and the other ones ($x_2$ and $x_5$ in your example above) are "free".
I say that it is is arbitrary because if $x_1 + x_2 = 5$ then we could say $x_1 = 5 - x_2$ or equivalently $x_2 = 5 - x_1$. In any event, the number of pivots corresponds to the number of equations you actually have.
A good reference for learning about this is chapter 2 of Strang's Linear Algebra and It's Applications.