In Section 1.12, Chapter 1 in Jackson's Classical Electrodynamics, he considered an "energy-like" functional, $$ I[\psi]=\frac{1}{2}\int_V\nabla\psi\cdot\nabla\psi\ d^3x - \int_V g\psi\ d^3 x, $$ and performed methods of variation with Green's first identity (as shown in Section 1.8 of the same chapter) to derive $$\nabla^2\psi=-g,$$ which immediately implies that $\psi=\phi$ and $g=\frac{\rho}{\epsilon_0}$, where $\phi$ is the potential and $\rho$ is the charge density, according to the Poisson equation. I have three questions about the discussion above.
1. Why must $\psi=\phi$ and $g=\frac{\rho}{\epsilon_0}$?
Although I know it is intuitive that the result should be the Poisson equation, I cannot mathematically be convinced. When he introduced the functional, neither $\psi$ or $g$ is specified, so I assumed that after a series of calculations to the final result, any function that satisfy certain conditions (i.e., $\psi(\mathbf{x})$ is well-behaved inside $V$ and on its surface $S$, and $g(\mathbf{x})$ is a specific "sourced" function without singularities within $V$, according to Jackson) will do.
2. How did he come up with this functional?
I am guessing that he used the already-known Poisson equation with something similar to the least action principle but I don't know exactly how.
3. Does the "energy-like" functional have any physical interpretation?
Plugging in $\psi=\phi$ and $g=\frac{\rho}{\epsilon_0}$ to the functional, you obtain
$$
I[\psi]=\frac{1}{2}\int_V\left|\mathbf{E}\right|^2\ d^3x -\frac{1}{\epsilon_0}\int_V\rho\phi\ d^3x,
$$
which looks somewhat like a combination of two different expressions of the electrostatic potential energy except some differences in multiplication constants. Does this functional or its extremum mean anything?