For given $f \in L^2(\Omega)$ Poisson's equation reads $$- \Delta u=f \quad \text{on }\Omega.$$ So the variational problem becomes: For given $f \in H^{-1}(\Omega)$ find $u \in H_0^1(\Omega)$ such that $$\int_{\Omega} \nabla u \cdot \nabla \varphi \, \mathrm dx=\int_{\Omega}f\varphi \, \mathrm dx.$$ for all $\varphi \in H_0^1(\Omega).$
Why don't we keep $f \in L^2(\Omega)$?
For the poisson equation the natural space of the weak formulation is $H^{-1}$. However it is wrong or at least bad style to write it as an integral. It is advised to use the bracket notation $(f,\phi)_{H^{-1}}$.
Notice that for all functions $f\in L^2$ there exists an associated element $f^*\in H^{-1}$ given by $$ (f^*,\phi)_{H^{-1}}=\int f \phi dx $$
To this end it is common to simply use $f$ instead of $f^*$. But it is not possible the other way round: not every element of $f\in H^{-1}$ can be represented via an integral.