For example you can write to /data/local/tmp with adb shell but not a common terminal application. Why is that?
adb shell is basically used for debugging an application on android. It has increased no.of permissions because, it checks the android device compatibility, rooted or not, manifest files and other sensor based checks.
you can list the permissions by punching in...
$adb shell pm list permissions
It has the ability to minimise the permissions, and the ability to increase the no.of permissions for rooted devices.
$shell pm [grant|revoke] com.my.app