Is religion a way to control the masses?

yes