What is the motivation of functional analysis? What originally motivated its study? By functional analysis, I mean the study of Banach and Hilbert spaces.
The original motivation was the work of Fourier. Fourier's principle of superposition in formulating and solving the heat equation was an abstract definition of linearity and linear operator, and it came well before concrete notions had been formalized. Fourier argued that if you superimposed heat sources, the individual solutions would be superimposed, and if you magnified the source, the result would be likewise scaled. The general concepts of linear space and linear operator were thus defined in this infinite-dimensional context of the heat equation long before the definition of a finite-dimensional vector space, finite-dimensional linear operator, or eigenvalue/eigenvector analysis was conceived. The finite-dimensional grew out of the infinite-dimensional, which is particularly strange.
Fourier then devised his method of separation of variables to solve his heat equation in different coordinate systems. This lead to the study of symmetric differential operators, eigenvalue problems, and orthogonal expansions; as mentioned, this came before such things had even been defined in finite dimension linear space. Fourier conjectured that general functions of his time (which were basically piecewise explicitly given by concrete functions,) could be expanded in these orthogonal functions. These ideas caused those in power at the time to ban his original manuscript from being published for over a decade, until Fourier came to power in the Math community, and forced its publication in basically its original form. Analysis was in its infancy during that period of time, crippled by the fact that 20+ centuries of thought had not yet produced a rigorous definition of a real number. Cauchy had defined a sequence that he described as "converging on itself" (now called a Cauchy sequence) without any means of finding a limit. General functions of that time were explicit, but did allow for piecewise defined functions. There was no Set Theory, or general rigor. Mathematical Analysis was driven a lot by opinion, intuition and consensus. And there was no definite integral, which really complicated an understanding of the Fourier series.
Several decades later, Riemann defined his integral with the stated intent of studying Fourier expansions. Later Lebesgue refined Riemann's work, also with the stated intent of studying Fourier expansions. During these times, Cantor came up with set theory, and with the first definition of a real number, which made it possible to address serious questions of convergence. Fourier Analysis gave rise to the Cauchy-Schwarz inequality in Schwarz' paper on integral equations, and the stage was set for dealing with functions as points in a space, with a distance metric to study convergence, which could be used to complete the space a few decades later. Methods of completing the rationals to the reals were borrowed to study spaces where functions were points, and an abstract distance was defined. Frechet defined a metric space in his Master's thesis. An abstract metric was defined, and General Topology grew out of the abstract notion of a neighborhood of Hausdorff. All of this had a rigorous foundation because of Cantor's Set Theory.
In the midst of all of this, Hilbert defined his infinite-dimensional extension of Euclidean space, $\ell^2$, and it was built to order to study Fourier series and other orthogonal expansions. Part of this was driven by the need to be able to digest the deep work of Fredholm on integral equations, which eventually happened because of Riesz' abstractions leading to the notion of a compact operator. Compactness had come into existence and study not long before that after having a rigorous definition of a real number. Riesz was one of the first to look at a continuous linear functional on continuous functions on $[a,b]$, and he was able to prove that such a thing was a Riemann-Stieltjes integral. Others began looking at continuous functionals, and $L^p$ arose in the context of understanding dual problems, eventually leading to the understanding that a continuous dual could not be identified with the original space, which was quite a surprise after studying finite-dimensional Linear Algebra.
General spectral theory emerged because of trying to understand the orthogonal function expansions of Fourier, many of which were very non-trivial. Operator theory grew out of von Neumann's work, who was a student of Hilbert. General notions of distance and Frechet metric led to Hausdorff's neighborhood axioms of General Topology. General linearity and linear operator came out of Fredholm's work, and was promoted by von Neumann. Operator theory and abstract linear space were borrowed by Dirac for Quantum Mechanics. von Neumann looked at Quantum foundations, proved a general Spectral Theorem for unbounded selfadjoint linear operators. And he studied Operator Algebras.
That's a basic outline of the development leading to the modern setting of Functional Analysis.