It wasn't really discovered in a mathematical sense of "exploration of higher dimensions" but more as a result of everyday experiences.
Euclidean "plane" is classic 2D Geometry - studying what can be done with lines/triangles and circles, the primitive geometric elements, and deriving various proofs. This is not clear from everyday experiences.
You don't find perfect triangles in nature. They're a geometrical construct that uses the concept of a line (which itself is not "well defined" by modern standards in The Elements). So, the study of 2D geometry does require creative thought and application of deductive logic/proofs, constructions with straight-edge and compass (for the most part).
However, we see the world in 3 dimensions. To give "perfect meaning" to shapes, they used the 2D analogs and built what we call "surfaces of revolution" to define some basic shapes they were familiar with (mostly owing to their experiences with pottery perhaps):
- Cone: A right triangle is rotated about one of it's 'right' sides
- Cylinder: A rectangle rotated around it's central axis or just around it's sides (sort of equivalent)
- Sphere: Circle rotated around it's diameter.
In theory you could just rotate any primitive shape and get a corresponding 3D shape. We've lost Euclid's book on Conics so we don't know if they ever rotated those to get some interesting shapes. The cube was just the most primitive shape. But I'm sure they made some vases in those days so I'd conjecture they did something :)
They studied some "other shapes" like the platonic solids, the various "hedrons" (tetra-, dodeca-, icosa- ...) since they combined symmetrical shapes to get interesting 3D objects.
So, they just analyzed the shapes and explored the corresponding 2D counterparts i.e., areas in 2D implied volumes in 3D. They concluded that volumes are proportional to the "cube" of the "variable" i.e., length of radius/side of a cone/cube, since areas are proportional to the "squares" in the 2D world. Finding exact formulae was a separate thing (e.g., for a sphere)
Eudoxus had conjectured that the volume of a pyramid is $\frac{1}{3}$rd that of the enclosed "cylinder" i.e., a cube. Euclid 'perfected' this method of exhaustion as we call it, and published a clean proof in his books.
If you read the elements you'll see, that 3D analysis was a natural extension owing to everyday experiences. They proved what they could and what made most sense "by analyzing" shapes or cutting them (e.g., you'd always get an ellipse if you cut a cylinder diagonally across it's height).
The advantage of this "study" was applications to architecture I believe but nothing beyond that. The greeks firmly believed in a world they could "perceive" and hence they spent time analyzing that, even in their mathematical endeavors. But I don't think they did it as an exploration of higher dimension math.