Several authors (also of standard RiemGeo books) write that the sectional curvature of a plane $\pi$ contained in $T\_pM$, where $(M,g)$ is a Riemannian manifold of any dimension, is the "Gaussian curvature" in $p$ of the surface $S$ generated by the geodesics starting at $p$, with tangent velocity belonging to $\pi$. Then,unfortunately and surprisingly, they define the Gaussian curvature for surfaces embedded in $\mathbb R^3$. I do not really have an idea why, since the situation is completely different. You actually need a definition of Gaussian curvature for abstract surfaces or at least for surfaces embedded in a generic Riemannian manifold (at least $\mathbb R^n$, with $n\geq 4$, by Nash embedding Thm that would be sufficient) with any codimension, not only for embedded surfaces in $\mathbb R^3$, since not every abstract surface can be isometrically embedded in $\mathbb R^3$. Hence, also mentioning the "Theorema egregium" has apparently nothing to do with that, since it deals with surfaces in $\mathbb R^3$, and this is completely not the case. Moreover they usually say that this was the way (what way? It is not defined!) Riemann generalizes to abstract manifold the concept of curvature... I never saw the original papers of Riemann, so I cannot say if this is true or not, but something is not quite clear here. Hence, here are my (first) questions:


* What is the definition of Gaussian curvature for an abstract surface? At least for isometrically embedded surfaces in $\mathbb R^n$, with $n\geq 4$? - Definition almost impossible to be found clear in these books (up to my knowledge... if I am wrong, my mistake) and around the web...
* How Riemann really defined sectional curvatures? Does someone really know?
* Why people mention the "Theorema egregium", that deals with a completely different situation? Clearly not this one...



Sectional curvature and Gauss curvature
There is no standard / classical definition of Gaussian curvature except for surfaces embedded in $\mathbb{R}^3$. I think the pattern of exposition that the OP is asking about is really just an allusion to an unjustified assumption made by Riemann as he was inventing what we now know as intrinsic geometry. This assumption lead to some interesting mathematics, and it's worth going into a bit more detail.


In the comments the OP cited page 88 of do Carmo's book on Riemannian geometry as an example; I'll use that to frame my answer (I don't have a copy of Spivak, vol 2 handy).


Do Carmo reviews the following proposed definition of sectional curvature, attributed to Riemann himself. (Note that this is the introduction to the chapter on curvature, intended as motivation rather than the official definition.) Take a point $p$ in a Riemannian manifold $M$ and a tangent plane $\sigma$ at $p$. Apply the exponential map to a small (exponential) neighborhood of the origin in $\sigma$ to obtain a 2-dimensional submanifold $S$ of $M$ containing $p$. Do Carmo writes, "Since Gauss had proved that the curvature of a surface can be expressed in terms of its metric, so Riemann could speak of the curvature of $S$ at $p$... This was the curvature considered by Riemann in [Ri]." ([Ri] being Riemann's ["On the hypotheses which lie at the foundations of geometry"](http://www.cs.jhu.edu/~misha/ReadingSeminar/Papers/Riemann54.pdf).)


Implicitly, what this means is:


1. Isometrically embed $S$ as a surface in $\mathbb{R}^3$.
2. Compute the Gaussian curvature at the image of the point $p$.
3. By Gauss' Theorema Egregium, this number does not depend on the chosen isometric embedding, and hence we can define the curvature of $(p, \sigma)$ to be this number.


The OP objects to step 1, with justification. But note that this procedure does not require the existence of isometric embeddings of arbitrary 2-dimensional Riemannian manifolds in $\mathbb{R}^3$, only *local* isometric embeddings. This is easier: for instance, the [pseudosphere](https://en.wikipedia.org/wiki/Pseudosphere) is locally isometric to the hyperbolic plane.


Of course, Riemann did not attempt to rigorously justify step 1. Riemann's "On the hypotheses..." was not a formal mathematical paper with definitions and theorems - it was lecture in which Riemann was proposing the possibility of doing geometry outside of the confines of ambient Euclidean space, and how it might work. In 1873 - not long after Riemann's lecture was published - Schlaefli conjectured that every smooth Riemannian $n$-manifold admits a smooth local isometric embedding in Euclidean space of dimension $\frac{n(n+1)}{2}$ (which would include step 1 as a special case), and this was proved by Janet and Cartan in 1926 for *analytic* metrics. The smooth case is still open, even for $n=2$! It comes down to finding local solutions to a certain partial differential equation, and the problem is that the type of the equation (elliptic / hyperbolic) depends on the sign of the curvature.


So that's the story. The proposed definition of sectional curvature above isn't actually viable, but it is historically part of how the theory got off the ground. And of course it wasn't long before Christoffel wrote down formulas for sectional curvature which don't depend on any embedding.


