Let $A,B$ be sets.
Then by Pair there exists a set $C$ with $\forall x\colon x\in C\leftrightarrow x=A\lor x=B$. (The Pairing axiom can be expelled by using Infinity and Power and Replacement, but I like to use it for convenience).
Then by Union, there exists a set $D$ with $\forall x\colon x\in D\leftrightarrow\exists y\colon x\in y\land y\in C$.
Then by Power, there exists a set $E$ with $\forall x\colon x\in E\leftrightarrow\forall y\colon y\in x\to y\in D$.
Then by Power, there exists a set $F$ with $\forall x\colon x\in F\leftrightarrow\forall y\colon y\in x\to y\in E$.
Then by Comprehension, there exists a set $G$ with
$$\begin{align}\forall x\colon x\in G\leftrightarrow {}&{}x\in F\\&\land\exists a\exists b\exists u\exists v\forall t\colon\\
&\qquad\ a\in A\\
&\quad\land\ b\in B\\
&\quad\land\ t\in u\leftrightarrow t=a\\
&\quad\land\ t\in v\leftrightarrow (t=a\lor t=b)\\
&\quad\land\ t\in x\leftrightarrow (t=u\lor t=v)\end{align}$$
is a set by Comprehension.
About $G$, we readily prove that each of its elements is a Kuratowski pair of an element of $A$ and an element of $B$ (in fact, the convoluted formula states precisely what could be abbreviated as $x=\{\{a\},\{a,b\}\}$)
On the other hand, let $x=\{\{a\},\{a,b\}\}$ be a Kuratowski pair of
an element of $A$ and an element of $B$.
We directly find that $A\in C$, hence $a\in D$. Likewise $B\in C$ and $b\in D$.
By Pair, the set we write down as $\{a\}$ (i.e., a set $X$ with $\forall z\colon z\in X\leftrightarrow z=a$) exists.
As $a\in D$, we conclude $\{a\}\in E$.
Similarly, we conclude that $\{a,b\}\in E$ from $a\in D$ and $b\in D$.
Similarly, we conclude that $\{\{a\},\{a,b\}\}\in F$ from $\{a\}\in E$ and $\{a,b\}\in E$.
Finally, we verify the condition for $G$ (with $u=\{a\}$ and $v=\{a,b\}$, of course) and see that $x\in G$.
Therefore $G$ is precisely the set of all Kuratoski pairs of elements of $A$ and elements of $B$, in short $G=A\times B$.
While the above shows that all works out nicely, there is some way in which your doubt is justified:
Suppose we have a set $X$ and a magical oracle that gives us what might be called a sub-collection $Y$ of $X$. Does that make $Y$ an element of $\mathcal P(X)$? Well, it does as long $Y$ is a set, but this may not be the case.
In principle, it might happen that $Y$ is "undescribable" and the powerset only contains all "describable" subsets. But then again, $Y$ is not the subject of set theory because it fails to be set. The subset relation then exists only in a meta theory ... and fortunately there is no such thing as a magical oracle.