Underlying idea for (automorphic) L-function? Edit: So with a few more months of math under my belt, I recognize some of the issues with this question. I still hope for an answer, so let me say a few things.
Within the Langlands philosophy, L-funtions associated to various automorphic representations are the invariant which ought to parametrize an extremely complicated and far-reaching interaction between automorphic representations of separate groups. This of course refers to Functoriality.
I get that the conjecture (ie: the definition of the Selberg class) is (vaguely) that the nice L-functions found in number theory and algebraic geometry should come from automorphic obects in some way, but the definition of the automorphic L-function is still mysterious to me.
I can read the definitions, and the  $\mathrm{GL}_n$ theory is truly beautiful. But it all seems like a big analogy chase, having seen the useful nature of Euler products and Dirichlet series in the past. In particular, I can't see why one would expect a connection between these L-functions and a correspondence as vast as functoriality suggests.
Is there a more satisfying rational for the definition of automorphic L-functions than "we get Euler products, and by analogy they ought to be important"?

To preface, I am a student of automorphic representation theory, and I know full well the definition of the L-function attached to an automorphic representation.
I am intending to give a talk on the question in the title to a group of graduate students and young researchers. While the history of and ubiquity of L-functions is an aspect of what I want to explain, there is a nagging question in the back of my mind that I do not know how to approach: 
Why is it that a Dirichlet series with analytic continuation and functional equation is such a potent idea? What is a unifying idea behind these constructions?
For many (all?) instances of L (or zeta)-functions in number theory, representation theory, (Artin, Hasse-Weil, Dirichlet, etc.) and perhaps many other fields I know less about (Selberg's zeta function) , the hope is that these are all instances of automorphic L-functions and are related in deep ways to an automorphic representation.
But on the automorphic side of things, I don't understand what the L-function actually is. The converse theorems gives me a partial answer in that the L-function is some local-global object (The definition as an Euler product) which encodes, along with its twists, automorphy of the representation. 
This then leads me to other questions for another time, and still seems more about why the L-function is useful, as opposed to what the L-function is.
My question, then, is

What is the (conjectural) underlying idea of what an L-function is, either in the automorphic case or more generally? Is there a sense of why such a construction gives a powerful way of connecting different areas of mathematics?

I have read Bump's Book Automorphic Forms and Representations, a few articles such as Iwaniec's and Sarnak's enjoyable article Perspectives on the Analytic theory of L-functions, as well as many of the brilliant responses to related questions here on MO.
As this is my first question, I apologize if my question is not clear, or is duplicate to a question I have not yet found. Thank you for your help!
Edit: In terms of an answer, let me say this: I was hoping that there is a known way, perhaps in terms of the relevant group, to see why the L-function construction should be so fundamental to so many theories. 
If there isn't a known answer in this sense, as was indicated by @Myshkin's answer, then I will be happy with intuition or heuristic understanding that is in this direction. Please let me know if this is still too broad or unclear. Thank you!
 A: I'm not really sure what you're looking for, but here are some thoughts, and if you want me to try to expand on some aspect, let me know.
As an analytic gadget
$L$-functions provide a way to use complex analysis to study algebraic objects.  Why are they good analytic functions for number theory?  Well, suppose you have some nice number theoretic object $X$.  Then often you can expect some sort of local-global principle, meaning $X$ is mostly (or completely) determined by associated local objects $X_p$ at all primes $p$ (well, sometimes you should include prime powers).  In fact, it often happens (Chebotarev density and the like), that you only need to know $X_p$ for a set of primes of sufficiently large density.
So, if you want an analytic function to take advantage of local-global principles, it makes sense to look for a kind of function that has an "Euler product," so the objects can be studied in terms of corresponding local analytic data.  In my mind, this is the first property you want.  For convergence of this "Euler product," you need local factors that are close to 1 (at least in some large domain), and something like a polynomial or geometric series is one of the simplest things you could guess.  For analytic reasons, you also want to be able to control the zeroes/poles of the local factors, which makes polynomials in $q^{-s}$ useful.
From another point of view, if you have some number theoretic sequence $(a_n)$, and you want to make an analytic function out of it, how can you do this?  Well, the most natural thing to do is use a series.  What are the options?  Power series?  Fourier series?  Dirichlet series?  If $(a_n)$ is a nice arithmetic sequence (multiplicative, polynomial growth) you won't typically have much convergence with a power or fourier series, and more importantly, you don't get the Euler product.
As a tool for functoriality
I don't (entirely) think of $L$-functions as some magical world where everything gets tied together (though they are quite magical).  I think of them as a useful tool to compare different objects which have related representations (though some people may take the opposite view).  Many interesting algebraic objects naturally have associated representations to them (or already are representations themselves), and the central idea in Langlands' conjectures is that automorphic representations of GL($n$) are the mother of all "arithmetic" (Galois) representations.  Meaning, to some arithmetic object $X$, we associate $n$-dimensional representations (sometimes just local ones), and these should correspond to automorphic representations of GL($n$).
For the functoriality aspects, the two key properties of $L$-functions are additivity ($L(s,\rho_1 \oplus \rho_2) = L(s, \rho_1)L(s,\rho_2)$) and inductivity ($L(s,I_{E}^F(\rho)) = L(s, \rho)$), and for this it matters what the precise form of the local factors are.  Roughly you want it to be a "characteristic polynomial" of the representation (at least for a finite-dimensional Galois representation---on the automorphic side, you want the analogous thing for Langlands parameter) so that additivity will hold.
Recall that the correspondence between Galois and automorphic representations says that the representations should locally correspond at almost all places, so it suffices to look at unramified places, where both sides should reduce to the 1-dimensional case of local class field theory.  Then the additivity of $L$-functions says the $L$-functions correspond.  Of course the main problem in functoriality is showing that $\pi = \otimes \pi_v$ is (globally) automorphic---constructing the $\pi_v$ for almost all $v$ is easy.  Then inductivity is useful to get compatibility with base change.
Note: not all Dirichlet series formed from arithmetic objects should give automorphic $L$-functions.  For instance, Koecher-Maass series (constructed with Fourier coefficients of Siegel modular forms) and zeta functions of binary cubic forms don't have Euler products.  Also, Zagier's "Naive BSD" paper considers variations of $L$-series of elliptic curves which do have Euler products, but not (apparently) meromorphic continuation to $\mathbb C$.  So it's better to look at things where, say $a_n$'s are multiplicative, and the $a_p$'s are traces of representations.
Edit: Upon rereading my answer, I realize I may not have spelled out a couple conclusions explicitly:


*

*The above reasoning more-or-less motivates the definition of $L$-functions of Galois representations.  The automorphic definition is then motivated by a combination of the result of Hecke that gives $L$-functions of modular forms as integral representations combined with the predictions of the local Langlands correspondence.

*My point of view is that the reason $L$-functions connect different ares of mathematics is because they reflect things like the global Langlands correspondence.  Unfortunately, I don't have a good intuitive explanation for why Langlands' conjectures should be true (one can make the trite remark that it generalizes class field theory, but that doesn't answer why in my mind).
A: This is not exactly an answer, but should illustrate how tentative the opinion of experts on L-functions is, when it comes to explain what L-function really are. Two quotes from the first volume on number theory by Kazuya Kato, Nobushige Kurokawa and Takeshi Saito:

It seems as if the homeland where $\zeta$ functions originally come
  form is an unknown world which governs both the world of real numbers
  and the world of p-adic numbers.

,

We named this chapter "$\zeta$" instead of "$\zeta$ functions". We
  dropped the word "functions" because we feel more and more as we study
  them that they are something more than just functions.

A: I think the question 'what is the underlying idea of an L-function' is rather subjective, so I'll attempt an answer in terms of a history lesson:
History: In 1644 what is now known as the Basel Problem asked for the exact value of $\zeta(2)$. This seems a natural question to consider since $\zeta(s)$ converges for $\text{Re}(s)>1$. In 1735, Euler gave the answer $\pi^2/6$, and this made him famous. As we know, he continued to study $\zeta(s)$ as a function of a real number, giving us the Euler product and its special values as Bernoulli numbers.
In the 1790s Gauss and others made conjectures on the growth of $\pi(x)$, the number of primes less than $x$. Then in 1837 Dirichlet introduced what we call Dirichlet series, and using its nonvanishing at $s=1$ he proved his theorem on primes in arithmetic progressions. Then in 1859 Riemann studied $\zeta(s)$ as a function of a complex variable, giving its functional equation and functional equation. This was to study 'prime numbers less than a given magnitude'. Having good control over the distribution of zeroes (including the RH) would lead to better estimates for the growth of primes. As it were, the final proof of the Prime Number Theorem waited till 1896 for the work of Hadamard and de la Vallée-Poussin.
Around 1920 Hecke wrote down his generalization of Dedekind (1836) and Dirichlet's series, while proving a functional equation and the Class Number Formula. Then in 1923, Artin introduced his 'new style of L-series' in a search for a nonabelian class field theory. Not long later, Artin made certain conjectures which led to Weil's Conjectures in 1949, giving us the Hasse-Weil zeta function. Around the 1960s, Artin and Grothendieck developed étale cohomology to solve these conjectures, completed by Deligne in 1974. This L-function takes its final form in that associated to motives (an algebraic cycle modulo some equivalence), essentially defined like Artin's.
Meanwhile, in 1936 Hecke wrote down L-functions for modular forms, and around 1957 the Shimura-Taniyama conjecture was formulated. Finally, in 1967 Langlands wrote his letter to Weil detailing his conjectures, along the way defined the L-function for automorphic 
forms. His inspiration for them was in computing the constant terms of Eisenstein series, which goes back to Selberg, while his motivation was also nonabelian class field theory.
What is the moral of the story? L-functions have been of interest in the following order: special values, prime number theory, (nonabelian) class field theory. Today, the questions are essentially the same, but we have a much better idea of how deep the rabbit hole goes. A sample: L-functions are seem to be better understood in families, whether the symmetry families à la Sarnak et al or p-adic families à la Hida and Coleman.
Now I'll take a stab at your question: automorphic L-functions seem to be invariants attached to stable packets of automorphic representations, and their L-parameters give a link to Galois theory. Though they begin life as analytic objects, if certain conditions are satisfied then their special values can be detected algebraically, where motives and p-adic variation become powerful tools. A broader, and perhaps less satisfying outlook is that maybe what these L-functions are encoding in the end is symmetry. It's a soft answer, but I think there is something to it. After all, Galois theory, Lie theory, automorphy, harmonic analysis, and such are really studies in symmetry, are they not?
