What is the $\textbf{Set}$-theoretical intuition behind understanding how power objects work in Topos Theory? Definition. Let $\mathcal{E}$ be an elementary topos, $B \in \text{Ob}(\mathcal{E})$.  Then a power object for $B$ is an object $PB \in \text{Ob}(\mathcal{E})$ together with a morphism $B \times PB \xrightarrow{\in_B} \Omega$ such that for every $f: B \times A \to \Omega$, there exists a uniqe arrow $g : A \to PB$ such that $\in_B(1\times g) = f$, where $1\times g$ is the product map of $\text{id}_B \equiv 1$ and $g$.
In diagramatic form, it's just the following triangle, that uses dashed lines to mean $\exists 1\times g$.  I forgot to put in uniqueness though, so imagine a $!$ next to the $1\times g$.

So my question is basic.

What is the $\textbf{Set}$-theoretical intuition behind this definition?

I understand how $\in$ works in set theory, but I'm having trouble grasping all the machinery needed here to transfer over to a topos.
I'm thinking that we want to treat $f$ as a function mapping to either true or false (for some topoi examples) which describes a relation $R \subset B \times A$, but it doesn't seem to me how any arbitrary relation could make sense or be related to how the $b = a$ or $B \ni a$ works.
I'm having major confusion about this and can't find a good explanation on the web.
 A: As the name suggests, the "power object" of an object should be thought of as an analogue of the standard notion of the powerset: $\mathcal{P}(X)$ is the set of all subsets of $X$, and (tweaking notation a bit) the elementhood relation $\in$ provides an obvious morphism $$\varepsilon:  X\times\mathcal{P}(X)\rightarrow\{\top,\perp\}: (u, U)\mapsto\begin{cases}
\top & \mbox{ if } u\in U\\
\perp & \mbox{ if } u\not\in U.\\
\end{cases}$$
Now we can check that for every set $B$ the pair $(\mathcal{P}(B),\varepsilon)$ satisfies the "power object property" in the topos Sets: given an arbitrary set $A$ and a morphism $f: B\times A\rightarrow \{\top,\perp\}$, we think - as you say - of $f$ as representing a relation on $B\times A$. The desired $g$ takes each $a\in A$ and map it to the set of $b\in B$ such that $(a,b)$ is in the relation representing by $f$; that is, $$g: a\mapsto \{b\in B: f(a,b)=\top\}.$$
A: The set theoretic intuition is that relations between $A$ and $B$ are in a natural bijective correspondence with functions $A \to \Bbb{P}(B)$. From left to right, the correspondence maps a relation $R \in \Bbb{P}(A \times B)$ to the function $g:a \mapsto \{ b \mid a \mathrel{R} b\}$ from $A$ to $\Bbb{P}(B)$. In the other direction, it maps $g : A \to \Bbb{P}(B)$ to the relation $\{(a, b) \mid b \in g(a)\}$.
In the topos setting, taking binary products ($A \times B)$ and the subobject classifier ($\Omega$) as the basic concepts, we model binary relations between $A$ and $B$ by morphisms $A \times B \to \Omega$, where a relation $R$ is modelled by a morphism that intuitively maps a pair $(a, b)$ to the truth-value of $a \mathrel{R} b$. Using the idea of the previous paragraph, this lets us characterise power objects. (It is also possible to take products and power objects as the basic concepts and use them to characterise subobject classifiers.)
