I really intended for this to be a comment. You should take a look at Why are Sobolev spaces useful? There are some nice details there.
Firstly, if you had a sufficiently smooth function, then solving a PDE in the classical sense is equivalent to solving it in the weak sense. Next, asking why we have to multiply by test functions, integrate over the domain and integrate by parts to “get the weak form” isn’t really the right question, because the “weak form” is by definition the name we give to the result of following this procedure.
So ok, I guess your question is really the deeper one of ‘why bother with the weak formulation’ if it’s equivalent to the classical form (otherwise we’re just stuck talking about semantics). The answer is that the equivalence I mentioned above was conditioned on the function being sufficiently smooth, but sometimes we really have to deal with non-smooth phenomena, and so for this we need to deal with lower regularity objects (functions, domains etc). Also, a recurring theme in analysis is that derivatives are bad, while integrals are good, atleast as far as regularity and limits are concerned (to exchange derivatives with limits is a pain, without things like uniform convergence, whereas for integrals, there are MANY theorems to this effect, most notably Lebesgue’s dominated convergence theorem).
Once you put things in the weak form, you have ‘gotten rid of one derivative’, so you need one less derivative to make sense of things. For example, for Poisson’s equation $-\Delta u=f$ on a nice $\Omega$, the weak formulation would be $\int_{\Omega}\nabla u\cdot \nabla v\,dx=\int_{\Omega}fv\,dx$ (for $v$ in a suitable function space). Notice that here, we only see $\nabla u$, which is one derivative, rather than the original two in $-\Delta u=f$. Thus, to make sense of things, we need one less derivative. Next, because things appear under the integral, we can generalize our understanding of $\nabla u$ to mean weak derivatives. These are ‘derivatives’ of a function $u$ which are not defined ‘pointwise’, but in an averaged sense (i.e with respect to some integrals). Again, by the mantra of integrals> derivatives, this approach allows us to be more general.
Now, I should mention that generality by itself is never the answer, so what do we gain by all of this? Well one of the basic questions in PDEs is existence and uniqueness. To prove existence of a solution to PDEs, one typically finds ‘approximate solutions’, and then takes limits to get to a ‘true solution’. See how limits show up again? Well, because we have now converted our problem from derivatives (and pointwise spaces like $C^k(\Omega)$ spaces) into integrals (and weak derivatives and Sobolev spaces $W^{k,p}(\Omega)$), we are in a much better position to handle these limits. After all this is done, one can then go back and try to improve the smoothness of the solution so that a weak solution is a-posteriori proved to be a classical solution. These are called regularity theorems (the most famous one is elliptic regularity).
So, the weak formulation (though it seems roundabout), is a really convenient way to handle various limits, and atleast for linear PDEs, it gives us the perfect opportunity to apply some of the wonderful abstract functional analysis (and indeed, a lot of functional analysis was designed to deal with ODEs/PDEs, and integral equations).