Too Long; Didn't Read
There are multiple environments in the pipeline that are used to test your code. Each environment has different access levels to services and varying public side access. Staging is where your code goes before it gets shipped to production. QA (quality assurance) environments are usually set up for software testing engineers to systematically hunt bugs and issues with the app from a user perspective. The main area that you need consistency in is the data. If you can get the data from production and obfuscate it, that will be the data to develop your app.