It takes into consideration that who needs what, what will sell, what is cheap to mass produce and if it is profitable and if it is, by how much. If its profitable and cheap to mass produce and is needed by many people then they will be producing lots of that good.