-
They have cheap, powerful AI. We know it is cheap because we see human (and beyond?) level AIs everywhere, even casually junked. Those AIs can be designed to operate droids that do anything, including every step of mining and manufacturing, including the manufacturing of more AIs and droids.
-
They have cheap antigravity. We know that it is cheap because it is used casually everywhere, even in small toys for children. That antigravity means that anything can be mined without having to worry about lifting the raw materials or finished products out of a gravity well with chemical rockets like we do. They can disassemble not only asteroids and comets but also moons, rocky planets, and gas giants.
-
They have cheap, extremely high levels of FTL. We know that it is cheap because while not everyone has a personal FTL-capable interstellar spacecraft, they are far more common than they would be if staggeringly expensive. So think something similar to the price of a luxary car or a tractor trailer. This means that the self-replicating robot factories can mine anywhere, in your own system or in a dead system elsewhere. Trillions and trillions of tons of potential raw materials for each sentient in the galaxy.
This isn’t pie-in-the-sky thinking, it is simply extrapolating from the technologies existing in that setting. (Other things to help—extremely high-density energy storage and blades of energy that can quickly cut through almost anything—very useful in mining and manufacturing.) Those technologies would lead to a society exponentially different from what we have and what we see on-screen.
You don’t seem to understand the concept of “post-scarcity”. “Trade” is only necessary when there are limits on resources that are distributed unevenly. Nobody would trade anything at all with Tatooine because nobody would have anything that Tatooine needed because everyone on Tatooine would have everything they needed for free from their droid factories disassembling everything in their solar system not Tatooine. (And if they even bothered to live there, they would replenish their oceans from comets and wherever else it is found in their outer solar system.)