I am not sure if I understood your question well. I try to give an answer to the following,
"Why is it expected that the trace formula implies cases of Langlands functoriality?"
hoping that it is the right question.
Very roughly I think the idea is as follows.
Let $G, H$ be two connected reductive groups, and suppose given an L-morphism $LG$ to $LH$, where $LG$ (resp. $LH$) is the Langlands dual of $G$ (resp. $H$), with certain properties. Then one expects (conjecture) to be able to relate automorphic representations of G to automorphic representations of $H$.
With the trace formula one attempts to prove (cases of) this conjecture.
To simplify, assume that the groups are anisotropic.
Let $\pi$ be a cuspdial automorphic representation of G. Assume now, that we are in the following very fortunate situation. Suppose that we have a function g on G(adeles) and h on H(adeles) which have the following properties.
(0) For convenience only: assume that the functions are elementary tensors $g = \bigotimes_v g_v$, and $h = \bigotimes_v h_v$ ($v$ ranges over the places of $Q$).
(1) The trace of the function g acting on an automorphic representation of G is zero unless it is isomorphic to $\pi$.
(2) The trace of the function h acting on an automorphic representation of H is zero unless it is isomorphic to a certain fixed representation $\pi'$.
Unfortunately I do not know how to formulate the third, and most important condition in a precise manner in the above generality. But I will try to give an idea anyway.
(3) The pair of functions (g, h) is associated. This means the following. From the map of L-groups one should be able to transfer conjugacy classes in $H(Q_v)$ to conjugacy classes in $G(Q_v)$. One then asks that the orbital integral of $h_v$ at a conjugacy class $c$ is equal to the orbital integral of $g_v$ at the $G(Q_V)$-conjugacy class obtained from $c$ by transfer. Moreover, the orbital integral at any $G(Q_v)$-conjugacy class which is not a transfer is demanded to be $0$.
Then, using (3) the geometric side of the trace formula of $G$ can be compared with the geometric side of the trace formula for $H$. So applying the trace formula for $G$ and $H$ at the same time, we see that the spectral side of the trace formula for $G$ is equal to the spectral side of the trace formula for $H$. But, by (1) and (2), on these spectral sides only the representations $\pi$, $\pi'$ remain.
The point is then that $\pi \rightarrow \pi'$ is the ''candidate'' for the automorphic representation predicted by Langlands functoriality.
There are many problems with the above. We already saw that it is not clear how to define (3) in general. Moreover, (1) and (2) are often not possible, only for finite sets called packets. Next, there is a problem with non-stable conjugacy; in an algebraic group there are several notions of conjugacy, for example rational conjugacy (two elements are conjugate by an element of G(Q)) and conjugacy over the algebraic closure (two elements are conjugate by an element of G(Q)). There is also a third notion, "stable conjugacy", and one has to work with this one if one wants to have a chance to give a meaning to (3). This also implies that you have to work with a different trace formula instead, "stable trace formula" ... complicated!
An example of (proved) Langlands functoriality is Jacquet-Langlands. One then knows how to give a precise definition of (3), because in this case G and H are inner forms. In my opinion this is explained very well in section 2 of
Another case where (3) is defined is when $H$ is an endoscopic group. This is also explained in the Paris book project by Harris,