primarily because a container may be running multiple applications and you don't want one application accessing classes from another application
But there are also general purpose classes that can be shared that you don't want to have to deploy in every application