The reason is this class that changes the behaviour of Android classes manipulating the bytecode
https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:build-system/builder/src/main/java/com/android/builder/testing/MockableJarGenerator.java;l=60?q=MockableJarGenerator&ss=android-studio/platform/tools/base