A lot of ads and not very much ongoing development.
I'm not sure "until the day it was shut down" is totally correct though. AOL were moving from their own data centers to AWS at that stage and AIM was one of the last apps left in, so I find it hard to believe that AIM would still have shown green near the end if the data center costs were spread across the services using them (we didn't have a chargeback model in those days).
I think the decision (I worked at AOL at the time, but far from AIM) to shut it down came down to:
1. There was no dedicated dev team
2. Consequently the tech was old and not up to then modern security practices
3. Even aside from security, it used a lot of in-house tech that other more actively maintained products like mail had migrated from and newer products never used.
4. Lots of the software it used like OS versions were going EOL
5. It needed an AWS migration as the data center was shutting down.
6. It didn't fit with the strategic direction (which was to use revenue from legacy but shrinking businesses like dialup/search/mail to pivot to owned content as a USP/headline piece for the adtech business)
So someone had to make a cost/benefit analysis of shutting it down versus investing enough to bring it up to speed and that's before you even consider the user facing improvements that would have been needed to reclaim market share from Facebook and Skype.
Also number 1 for the user facing improvements would have been "less ads, less intrusive ads" which also would have hurt revenue.