Recently I encountered in a class the fact that there is a generating function of Gromov--WittenGromov–Witten invariants that satisfies the Korteweg--deKorteweg–de Vries hierarchy. Let me state the fact more precisely. Define $$\langle \tau_{k_1}\cdots \tau_{k_n}\rangle := \int_{\overline{\mathcal{M}}_{g,n}} \psi_1^{k_1}\cdots \psi_n^{k_n},$$ where $\overline{\mathcal{M}}_{g,n}$ is Deligne--MumfordDeligne–Mumford space and $\psi_i$ is the first Chern class of the line bundle over $\mathcal{M}_{g,n}$ whose fiber at a given curve is the cotangent line at the $i$-th marked point of that curve. Next, define $$F(t,\lambda) := \sum_{g=0}^\infty \lambda^{2g-2} \sum_{n = (n_1,\ldots,n_k)} \frac {t^n} {n!} \langle \tau^n\rangle_g,$$ where $t = (t_0, t_1, \ldots)$ and $\lambda$ are formal variables. Then for all $n \geq 1$, $F$ satisfies the following PDE: $$(2n+1)\lambda^{-2}\partial_{t_n}\partial_{t_0}^2F = \partial_{t_{n-1}}\partial_{t_0}F\partial_{t_0}^3F + 2\partial_{t_{n-1}}\partial_{t_0}^2F\partial_{t_0}^2F + \frac 1 4\partial_{t_{n-1}}\partial_{t_0}^4 F.$$ Note that when $n=1$, it follows that (up to coefficients and $\lambda$) $\partial_{t_0}^2F$ satisfies the KdV equation: $$q_t = qq_x + \frac 1 2q_{xxx}.$$
I was very surprised that a generating function whose coefficients come from the geometry of Deligne--MumfordDeligne–Mumford space should satisfy a nonlinear PDE for waves in shallow water. My question is:
Is there any "moral" reason for why a water wave PDE should have any connection with Gromov--WittenGromov–Witten invariants?
My understanding (correct me if I'm wrong) is that Kontsevich's proof of this (which went by forming a cell decomposition of $\overline{M}_{g,n}$ using ribbon graphs) doesn't shed light on my question.