You're conflating three different eras. There was an era where backlot filming was the norm ("classic" movies before roughly the 70s), an era where on location was expected by audiences (pre-CGI), and the modern one we expect now. That's all rough and the reality is more intricate.