As far as I understood, when the main activity is used "activity.finish", the application DO NOT finish, the operating system determines when the application is finished.
Now when you "compile and install" if the application is running, it's finished.