Give us anything to work with.
I'm going to answer by making assumptions.
The fluid is water, so carbon steel piping was used. Since it was buried, it would have been externally coated and/or wrapped.
Since the corrosion was isolated in the form of holes and not generalised, I would assume the external coating/wrap got damaged at some point, likely at installation, resulting in minuscule holidays, exposing the susceptible Carbon Steel to the highly corrosive soil, eventually resulting in holes.
...
But these are just assumptions.