This article provides a summary of MDM User Enrollment, including details about how Apple separates personal and business data on separate APFS volumes.
https://simplemdm.com/apple-user-enrollment/
Before User Enrollment there wasn't a great Apple MDM enrollment option that struck this privacy balance for employee-owned devices. App data couldn't be viewed per-se, though a list of apps is certainly available (as mentioned by cannonedhamster). Some companies would skip MDM and essentially "wrap" individual apps in order to have the ability to encrypt the app data and have some control over the binary, but that's about it.
I'm not sure of the story with Android, though I'm under the impression that there is a similar "sandbox" option for MDM, albeit the implementation and user experience is rather messy and obtuse.
Full disclosure: I work for an MDM software producer.
GPS toggle isn't doing much of anything besides application permissions enforcement.