This study examines, from an economic perspective, the factors influencing the decision of companies to use groundwater or not, in a context in which they have access to drinking publicly-supplied water and can also opt for self-supplying groundwater, and then estimates its groundwater demand. The Heckman two-stage model is applied, using microdata of a sample of 2579 manufacturing and service companies located in Zaragoza (Spain). The results of the first stage show that companies have economically rational behavior in the choice of their water supply sources: the probability to capture groundwater depends negatively on its cost and positively on the cost of publicly-supplied water. The results of the second stage indicate that the demand for self-supplied groundwater is normal, but inelastic (elasticity of −0.50), and that self-supplied and publicly-supplied water are substitutive inputs, where the cross-elasticity of the demand is much higher than the direct elasticity. These results warn of the undesirable consequences, on overall efficiency and environmental sustainability, of the lack of a volumetric fee that charges companies with the environmental and resource costs caused by the extraction of groundwater and emphasize the need for integrated management of all water resources.