All signs point to Altamid being an abandoned mining colony. Note that on several occasions on the planet we see large swarms of insects that perhaps inspired the creation of the swarmships.
JUNG: We had loftier ambitions about that planet from early on. Justin’s idea was that [the soldiers] were sort of like drones in a way, and that they don’t actually have a lot [of] conscious thought of their own. That sort of answers how Krall would be able to come in and take all this stuff.
But they weren’t a society that had weaponized anything. He took this energy source and perverted it in a particular way, and took over what was essentially a mining colony out there. It was one of those things were we felt that he didn’t have an invading force, but he was taking his skills as an ex-soldier and applying them in a way that he probably never thought he would have to do.
We Talk to BEYOND Co-Writer Doug Jung about Krall’s Soldiers, Deep Trek Connections, and His Acting Debut
As to why they left the planet, the logical answer would be that it was mined out. As to why there was so much stuff (literally hundreds of thousands of ships) it seems likely that Krall/Edison found a small abandoned colony and tasked the drones with building as many ships as possible with the available resources.