The problem is that there is no notion of inner classes at the bytecode level. Each inner class is compiled to a separate class with no special privileges compared to any other class in the same package. So in order to support the functionality of inner classes, the compiler has to add getter methods behind the scenes. Every time you access a field in the outer class from the inner class, the compiler needs to generate a getter in the outer class. However, these getters cannot be private because then nothing could call them! Therefore, the getter is always at least protected, meaning any class in the same package can access it.