Why do the Dirac-Maxwell Lagrangian and the QED Lagrangian look the same? I know that QED is some kind of second quantized version of the Maxwell-Dirac theory. But why is it that this modification to a second quantized version is just to replace the scalar function $\Psi$ by a field operator $\hat{\Psi}$?
 A: Your observation is that the field operator $\hat\Psi$ is supposed to satisfy the field equation of the classical field $\Psi$, i.e. the Dirac-Maxwell equation derived from the classical Lagrangian $$\mathcal{L}=\Psi (i\gamma^\mu D_\mu - m) \Psi \quad+\quad ...$$ where $D_\mu = \partial_\mu -i e A_\mu$ is the covariant derivative. Now let's take a step back and look at "simple" quantum mechanics. Take a harmonic oscillator, classically discribed by the Lagrangian function $$L = \frac{1}{2} m \dot x^2 - \frac{1}{2} m\omega^2 x^2$$ leading to the equation of motion $m\ddot x = - \omega^2 x$. Now we proceed to the quantum harmonic oscilator in the Heisenberg picture, i.e. the observable $\hat x$ obeys the time evolution $\dot{\hat{x}} = i\hbar[H,\hat x]$. This yields the time-dependent observable $$\hat x(t) = \hat x_0 \cos(\omega t) + \frac{\hat p_0}{m\omega}\sin(\omega t),$$ see this SE post. It is immediate that this suffices the classical equation of motion. The same is true for other canonically quantized systems in the Heisenberg picture and so is the case in QED. However, replacing $\Psi$ by an operator-valued field $\hat\Psi$ in the equation of motion does not at all grasp the full procedure of second quantisation.
So to draw a conclution, the operator field satisfies the classical equations of motion by construction of canonical quantization (in the Heisenberg picture). However, second quantization needs more than just replacing a classical field by an operator-valued field! There is a lot of standard liturature on this topic, so I would recomment to check it out if you want to understand the full extend of quantum field theory. Hope this could help to clearify the matter. Cheers!
P.S. Be carefull when calling the spinor field $\Psi$ a scalar function, it is way more then that! ;)
A: When going to second quantisation, the fields once denoted by $\phi$ and $\psi$ are replaced by field operators $\hat \Psi$ and $\hat \Phi$ which are essentially operators which create/annihilate particles at points in space represented by the fields.
A: Because the essential hypothesis of second quantization is that particles of first quantized theory are actually quantized modes of excitation in a universal field, and this is how the hypothesis is formulated mathematically.
Each mechanical degree of freedom of the original particle now becomes a field degree of freedom of the underlying field; and the one-body particle representation $ψ$ is now remade a representation $Ψ$ of a many-body assembly, whose members are the excitation modes of the field.
The state space that comprises many bodies that are each treated as distinguishable individual objects is called a Maxwell-Boltzmann Fock space. So, the first-quantized particle, and the first-quantized form $ψ$ is a representation in this state space; and an assembly of particles of this form would be treated as a many-body representation of fixed number in this state space.
The move away from first-quantized form is done partly to account for the literal absence of individuality of particles that had already been observed and known -- dating all the way back to the time of the discovery of the Gibbs Paradox in the 19th century. The import of that paradox is that particles have no more individuality than do waves of the same shape or form on an ocean; that the number of ways of putting two of the same kind in two boxes, with one in each box, is only one and not two. The result of swapping the two particles is literally the very same thing you started out with.
Correspondingly, the Maxwell-Boltzmann state space is replaced by a Einstein-Bose Fock space for force fields (where swapping between the two boxes leads to the same field) and Feynman-Dirac Fock space for matter fields (where swapping between the boxes reverses the field phase 180 degrees) ... and the single particle modes are recast as representations $Ψ$ over the appropriate Fock space.
The fact that the action principle looks the same in both first quantized and second quantized theory is an application of the Correspondence Principle at work: the second quantized theory should yield results that match the first quantized theory, in circumstances where particles can be treated as individual objects. Requiring that the respective actions have the same form is the most direct way to implement this principle.
Second, the move from first quantized to second quantized form is to also partly account for the ability for energy modes of the force fields (the three fields, electromagnetism, weak nuclear and strong nuclear, which we now know as the two fields, electroweak and color/quark field) to convert to and from particle modes; the prime example being the conversion of photons to or from electron-positron pairs; the second key example being the conversion of W's and anti-W's to or from electron-anti-neutrino or positron-neutrino pairs.
Since particle numbers can vary, you can't treat particles as being representations in a many-body state space with fixed particle number, but have to treat them as being part of a more fluid many-body state space where the numbers of members can vary.
So, even apart from the issue of particle identity, you'd still be stuck with making essential use of some kind of many-body space, be it Maxwell-Boltzmann or the Fock spaces. Otherwise, if the numbers were fixed and identity were not an issue, you could just treat it as a fixed-number Maxwell-Boltzmann state space and factor out the modes and just treat them as mechanical degrees of freedom - which is what the first quantized formulation does.
But even there, if you did, notice the hack that was already being done - stemming from the time of Planck, himself - to arbitrarily write in the Fock space axiom for first quantized theory. Planck's Law works with an Einstein-Bose distribution, not a Maxwell-Boltzmann distribution. The later work to account for the orbital structure of atoms had to similarly hack in the Pauli Exclusion Principle (and, correspondingly, the Fermi-Dirac Distribution) hypothesis. So, you were already going down that direction, early on.
The only disqualifiers to all of what I just described is the presence of a mathematical road block. The Haag Theorem specifically rules out the Fock Space formulation for quantum fields. So, there is something more going on here. The matter has never been fully resolved. The usual workarounds are either the retreat from the formulation of $Ψ$ as Fock space operators to singular operators (a.k.a. "operator-valued distributions") or an outright retreat from Fock spaces to a more general "algebraic" formulation of field theory that abstracts away from state spaces and puts the prime focus on the operators themselves.
A reference for that: "Algebraic Quantum Field Theory - an introduction" https://arxiv.org/abs/1904.04051
