In the introduction of "PERIODS OF AUTOMORPHIC FORMS "by HERVE JACQUET, EREZ LAPID, and JONATHAN ROGAWSKI, they said
"In many cases, it should be possible to characterize the $H$-distinguished cuspidal representations as images with respect to a functorial transfer to $G$ from a third group $G'$"
here $G$ is a reductive group over a number field $F$ , and $H \subseteq G$ is a subgroup obtained as the fixed point set of an involution $\theta$.
The case $(GL_n(E),GL_n(F))$ and $(GL_n(E),U_n(F))$ is well-studied by Jacquet, here $E/F$ is a quadratic extension. For general Galois model, there is a conjecture by Prasad (see https://arxiv.org/abs/1512.04347).
There are examples beyond the involution case, e.g the nonvanishing of Shalika period integrals is characterized in terms of functorial transfers from $GSpin(2n + 1)$.
There are also local analogues for the story. The question is (at least over $p-$adic field):
Why is Langlands functoriality usually related with period integral in a third group? What do we know beyond Galois case? What's the relation with relative Langlands program by Sakellaridis and Venkatesh?
Toy model: an irreducible cuspidal representation of $GL_n(\mathbb F_{q^2})$ is distinguished by $U_n(\mathbb F_q)$ iff it comes from $GL_n(\mathbb F_q)$ by Shintani lifting.