Use an AOI:
When you do not want to be able to access global variables, without passing them, in the code.
When you find it exciting to guess just how much free memory you need for the temporary memory used by the AOI when calling it.
When you do not want to be able to do online edits of the code.
When you want to use trial and error to find out at which amount of code an AOI saves memory instead of using duplicate code between routines.
But also when:
You need to lock part of the code from future editing.