Hi Abdullah,
It's hard to explain purpose of CLEANUP without considering purpose of INIT. To put it shortly - CLEANUP cleans what INIT populated.
Example can be a script with XDIM_MAXMEMBERS. In that case EXECUTE will be called multiple times. If it reads Master Data it will be more efficient reading MD in INIT. Then CLEANUP will remove data from those internal tables.
Hope that gives some idea.
Gersh