Because we don't know about its past and the ordering system is not as straightforward as it seems.
Before anything, I'd like to say that these drones seem to function a lot like ants. They clearly function more like a superorganism, in the sense that they act more like the cells of an individual organism than as a group of individual entities, especially since the swarm is usually not worried about its members specifically, but rather a about the collective. In how they seem to attack, they seem a bit like army ants, in the sense that they work as a large group to take down things much bigger and more powerful (some army ants species are no joke, when they march, it's common to see other creatures, especially other invertebrates, running away).
As for why they'd be called "Grey goo", it probably means they can function as something that at least looks like a fluid or mass, especially if you don't look attentively,. This would tell me that they probably have the ability to come together and form basic structures using their own bodies, much like fire ants use their own bodies to form towers, bridges and rafts (yes, fire ants can build rafts with their own bodies to survive floods).
With that little commentary done, why wouldn't the union use them all the time if they seem so good at destroying and consuming enemy weapons and troops alike? Well there seem to be two good reasons for not doing so:
1: Ordering them is a hassle. You gave an example of a possible order:
we say, seize control of planet x, and it can and will figure out how to do it and do it.
Sounds straightforward, right? Except it totally isn't, because since you can't really control the swarm's every action without issuing proper orders, you can't be sure that the swarm will seek a solution that matches the union's interests.
In a speculative scenario: the swarm determines that the most efficient way to seize control of planet x is to neutralize its well developed military forces in an all out attack on several locations, which requires the swarm to grow in size in order to accomplish the task, and so it increases its numbers. Where did it get the resources? Well planet Y over there had a bunch of resources so it destroyed a good chunk of its cities and population. Planet x's military has now been subdued and the planet is under control (there were also some rebellions preventing complete subjugation at first, but the swarm quickly figured out that tearing their members apart publicly and using the planet's own weapons to nuke areas with high number of rebels was the most effective way to end the pesky interference). But hey, now the swarm commands the planet, which is a simple task for it now since it's increased its numbers fivefold. Hope you have a place to accommodate the new drones, since ordering the swarm to destroy them would be wasteful.
With this brutal example, you can hopefully see the problems that come with leaving a hive-mind style swarm choose its approaches. The task was indeed achieved, but several people died and a third party was involved without having anything to do with it. The bigger the task the more you need to detail to the swarm what it must and mustn't do so that it doesn't only follow the orders it was given, but also that it's actions are in line with the Union's rules and interests. The bigger the task, the harder it is to predict potential problems that will hinder the swarm's objective, and the more likely that it will at some point face a problem that requires it to violate potential guidelines given before its mission. If all it has to do is small cleanup missions and dealing with leftover threats, it's a lot harder for things to take an unexpected turn, and easier to predict potential issues and instruct the swarm how to deal with them accordingly.
2- why are you trusting it? sure, the swarm composed of trillions of murderous drones ready to increase their numbers shows no sign of going rogue. Why would you completely trust them though? You didn't build them, you found them,and the majority of their abilities seem centered around one main purpose: to grow. Yes, it will obey any order you issue, but can you be sure it never had any intentions of its own at any point? Can you affirm that it will always interpret its orders according to the Uinion's wishes? Or that said orders can't be misinterpreted in any damaging way? Is there a way to ensure no rogue agent in the union can give the swarm orders that can result in the swarm taking actions that could harm the union itself? Or that could cause it to go back to doing what it did before the union got a hold of it, whatever it was? This once again begs the question on whether the system of ordering the swarm and trusting its choices is truly a reliable form of controlling this superweapon.
So tl;dr: why wouldn't the Union use it to deal with big threats? Because the union has little to no real means of reliably controlling the swarm's every decision on how to properly accomplish its orders, especially regarding big tasks with a large number of variables on what can happen; and because, no matter how you look at it, the swarm seems to have the primary purpose of expanding in size and power, meaning that the chances that it once had its own objectives can't be completely ruled out until everything about its past is known by the Union.