Someone built a location API or crypto API or whatever so that apps can use that data.
If there is a permission that violates the trust between the system and an app using aforementioned APIs all bets are off. This is similar to why rooted devices are bad for security.