If a powerful agent really wants to do X, and that X doesn't require well-being of humans, then it automatically has a motivation to exterminate them.
1) Their resources, energy and territory (and also the atoms they're made of) could be used to facilitate X.
2) There is a non-zero chance that humans might perceive the agent as a threat to them and try to stop or hamper it. That would undermine achieving X, so the existence of pesky humans who can do what they want is a risk to X, and so ensuring that X happens implies that this risk needs to be minimized - though that doesn't require extermination, a "mere" confinement so we can't really affect the future is enough.
1) Their resources, energy and territory (and also the atoms they're made of) could be used to facilitate X.
2) There is a non-zero chance that humans might perceive the agent as a threat to them and try to stop or hamper it. That would undermine achieving X, so the existence of pesky humans who can do what they want is a risk to X, and so ensuring that X happens implies that this risk needs to be minimized - though that doesn't require extermination, a "mere" confinement so we can't really affect the future is enough.