The difference between ASyncTask and Service as explained in this post Android: AsyncTask vs Service
AsyncTasks are designed for once-off time-consuming tasks that cannot be run of the UI thread. A common example is fetching/processing data when a button is pressed.
Services are designed to be continually running in the background. In the example above of fetching data when a button is pressed, you could start a service, let it fetch the data, and then stop it, but this is inefficient. It is far faster to use an AsyncTask that will run once, return the data, and be done.
Async tasks run on a new thread, every app has a UI(main) thread that you must use to update the app's UI, and if you are doing some work on the main thread that require a lot of time to complete you may get App Not Responding, so that is why you should do all the time and resource consuming work on a separate thread by using AsyncTask. Once started the AsyncTask is not destroyed until you explicitly call cancel() on the object instantiated from the class that extends AsyncTask, so if your activity gets destroyed the AsyncTask will continue working until it completes it's work. If you want to interrupt your AsyncTask when your activity gets destroyed, you should call cancel(boolean val) in activities' onDestroy() method where val if true will interrupt the method doInBackground() in your AsyncTask otherwise if false will let doInBackground() complete its work and in both cases instead of calling on onPostExecute will call onCancelled()