Mainly you do that for a better overview over your project. If you need to change anything simply open the file where the entity code is in and change it. The other thing is reusability as you can use the code for an "entity" for different things and don't have to code the same thing over and over.
You can use Google to find some tutorials about game engines, classes and so on. (even there are no real classes in AppGameKit but the idea behind it is the same).