The dopants are introduced through the surface (except when a crystal is grown from a doped melt or epitaxially), but they are driven by thermal diffusion to higher depths.
In bipolar transistors and in JFETs the active parts are junctions inside the semiconductor crystal between regions of the same single crystal where different dopants predominate. These junctions can be microns away from the surface and in old devices or in power devices even up to hundreds of microns away from the surface of the crystal.
In MOS transistors the active parts are at the interfaces between the semiconductor crystal and layers that are grown or deposited over it and moreover their properties are very sensitive to the presence or absence of various ions that can migrate during the lifetime of the device through those thin layers.
Surely doping is a surface phenomenon?