What are the scientific bases for selecting these variables?
Think there is no fixed rule to determine which variables are moderating variables / moderators, but we can always take cue from literature that we'd reviewed or justify with reasons / artifacts that there is relevancy for certain variables to be used as moderators. However, personally I observed many researchers used demographic factors as moderators.
There is an excellent book on this topic by Hayes 2013 titled Moderation, Mediation and Conditional Process. It's a must read book on the topic that you have highlighted.
Moderator variable is a variable has ability to change (positively or negatively) direction or size the relationship between independent variable and dependent variable.
Beside the persons demographics other characteristics of institutions or from the ecosystem of the institution being investigated or the concept applied within the institution have been tested as moderators as well. I agree with Prof. Han that the literature review helps a lot in identifying and then considering moderators.