For example, one often doesn't need to recompile subclasses even if they extend third-party classes that have been altered by their authors. For scientific work, distributing code is important for taking advantage of other programs that provide capabilities such as graphing, math functions, numerical analysis tools, etc.
Packages are the usual way of distributing such code.
The given package, unless it comes in a JAR file, must be put into a subdirectory that matches it's package name. Since the source code was available, we can put package corejava.