In 1970, the USSR began drilling at the Kola Super-deep Borehole. The target depth was 15,000 meters;
The stated areas of study were the deep structure of the Baltic Shield, seismic discontinuities and the thermal regime in the Earth's crust, the physical and chemical composition of the deep crust and the transition from upper to lower crust, lithospheric geophysics, and to create and develop technologies for deep geophysical study,
according to its Wikipedia entry.
Data obtained from previous seismic experiments had been interpreted to indicate a transition, which was supposed to be from granite above to basalt below about 7,000 meters. However, one of the surprising findings of the experiment was that there was no such change of kind of rock; the difference was metamorphic, now said to be a result of the changing pressure. Also,
...the rock at that depth had been thoroughly fractured and was saturated with water, which was surprising. This water, unlike surface water, must have come from deep-crust minerals and had been unable to reach the surface because of a layer of impermeable rock.
The source for this entry is Allen Bellows at damninteresting.com (which coincidentally places the supposed granite-basalt transition at "3-6 km"):
Because free water should not be found at those depths, scientists theorize that the water is comprised of hydrogen and oxygen atoms which were squeezed out of the surrounding rocks due to the incredible pressure.
So, why should water not be found at those depths? Based on what assumptions were people surprised to find water there? Or was it only journalists who were surprised?
I'm sorry I don't have more initial research; the truth is I don't know where to start looking. Online searches only give me results like this article at Science Magazine, which is related only because in its case, too, water is supposed to be "squeezed out" of rock, synthesized, as it were from its chemical components. (I asked this question at Codidact.physics, but it seems to need the broader context of geology)
Related: What do continents "lay" on?