That indeed is strange behaviour
. Is the AI running low on its resources? That could cause it to scrap huge amounts of its ships.
In those late games that i have observed the
AI usually goes to somesort of upgrading frenzy when it researches something upgradable. Very often this causes the AI
to run low on some of its resources and this
in turn causes it to start scrapping its ships. Problem could perhaps be partially solved by spreading those upgradable buildings in AI research txt file so that there is some time between those research
advances that force the AI into upgrading frenzy (it will replenish it's stocks while it is researching something else). Most of those upgrade buildings are very late in the
AI research txt file, so this might cause it to only happen in extreme late game. You were using mephistos mod? In this mod atleast the EA will build Atmospheric converters on its new planets as soon as it
researches the tech for it. This causes much strain on AI's economy and could force it
to scrap it's ships (if the AI has weak economy).