In social sciences research, two types of variables are selected.
First, we select a dependent variable. We select this because we are interested in that variable. This is something that is important to us like, for example, the amount of crime in a society (in sociology). We select this because we want to know more about it and what sorts of things affect it.
Next, we select our independent variable(s). We select these by thinking about what could affect our dependent variable. In the case of crime, we try to ask ourselves what variables (poverty, level of education, etc) might affect the level of crime in the society.
We select variables, then, for the purpose of thinking about what we want to learn and thinking about what factors might have an impact on that.