I'm worried about the future of computing devices. With Apple and Google going with the walled garden approach, What's to stop any government from telling Apple and Google that an app is illegal?
Nothing; that's most of the idea of a government.
So, to answer your question that starts with "What's to stop any government", the answer is : nothing.