Let $\Omega \subset \mathbb{R}^{n}$ a domain, and consider the following equation
(1) $-D_{j}(a_{ij}D_{i}u) = 0$ (Einstein notation)
The function $u \in H^{1}(\Omega)$ is a weak solution of (1) if
$\int\limits_{\Omega} a_{ij}D_{i}uD_{j}\varphi =0$ for any $\varphi \in H^{1}_{0}(\Omega)$.
for $a_{ij} \in L^{\infty}(\Omega)$.
What is the importance of finding weak solutions? Why Because these solutions live exactly in Sobolev spaces?
In your original problem you need two derivatives of $u$, whereas for the weak formulation one suffices. So you have reduced the regularity required for $u$ by integrating by parts. Sobolev spaces have been created specifically to be the appropriate spaces where solutions of PDEs in work form live.