@sejintenej
Hydroponics is a more rapid and effective way of growing crops but it has drawbacks which might make it difficult to use in places like California. Whilst supplying nutrients to the plants the liquid is also picking up "nasties" from them which have an adverse effect. Although the strength of nutrients in the solution can be monitored and controlled the solution has a limited life perhaps 2 or 3 weeks but current thinking is that one week is most economically effective. What do you do with the used nutrient? dump it in rivers? let the nasties build up in the soil where you dump it?
Would need to know a bit more about the "nastys" as you call them. Is there something particularly different about them compared to normal agricultural wastewater? Do they have some kind of commercial value, it might make trying to recover them a worthwhile endeavor.
Another consideration is an indoor growing environment, even a greenhouse, is going to want some degree of climate control. Now aside from rather large constructions that can take advantage of the chimney effect in a beneficial way, at least in theory, that means an active cooling or heating system, if not both.
I recall hearing about a community library in California that found a novel solution to offsetting their energy use during peak electricity use hours with regards to cooling their library. They created a large holding tank full of water. At night during off peak hours(cheaper electricity) they'd run their heat pumps(during the coolest time of the day, best efficiency for cooling) and freeze the water in the holding tank. Then during the course of the day the building heat pumps would transfer their heat to the giant block of ice they created the night before.
Now the fun thing here, and the reason to need to know more about the "nastys" in the water is some may begin to freeze before the water does. If the "nasty" is biological in nature, it's possible either (near) freezing or (near) boiling the water may be enough. Likewise others may only freeze well before the water does(or boil off/evaporate on the other end), so perhaps incorporating the facility's heat exchangers into the water system in some (multi-staged) manner (not much unlike an oil bypass filter for engines) could help address some of the issues involved?
There are many ways to skin an animal, no one way is best, as some of it comes down to personal preference. If someone decides they can make money doing something, and they find the financial backing needed to achieve it, well then it's obviously done at that point(having achieved the goal) and they have a pattern for others to follow. It then is simply a matter of people knowing about it, and their belief that using the method in question makes sense for their particular application.
Like with the hydroponic water getting polluted by nastys over time. They still have use for the water if it could be cleaned up enough for reuse. They probably still have use for much of what is in the water, if it can be recovered without significant amounts of "the undesirable" contents. The only question is, can those two aims be achieved at a cost comparable to simply bringing in more fresh water, and more nutrients from outside sources?
With current practices I'm given to believe the answer is no to both. So it's cheaper to dump the old water as waste, and start with a fresh batch once more. But then, water still remains fairly cheap and reasonably plentiful in most of the world, so it's hard to compete against outside of certain regions of the world. Once it becomes scarce somewhere and it ceases to be cheap, that will be when finding options for recycling it as much as possible will get pushed. As I keep bringing up, California is already near that point, so is parts of Australia, and a few other places as well in the developed world. So it is getting attention already, albeit it remains a fairly small market at present, but as more regions start to feel the pinch, that market will grow.
It isn't like somebody suddenly flipping a switch tomorrow and everybody is going to die of thirst next week otherwise.
It's going to be progressive situation, it will slowly worsen over time, time in which alternatives will be pursued, and solutions that probably already exist on paper will start to be built out as the precondition of perceived need and risk versus reward is reached.
Some solutions will work, others won't. Some will only slightly improve the situation while some may dramatically improve it. Some will be spectacular failures. That is the nature of invention. We certainly are not in immediate danger of water shortages to the level of it endangering global civilization, although we do have that prospect in the decades ahead.
Of course, that's another thing, the horizon on the day of reckoning also seems to keep moving out. Funny thing that. I'm pretty sure I could dig out some old National Geographic articles about how we were likely to be facing widespread shortages of drinking water, and possibly have already seen our first wars fought over water rights.... all by the then far off year 2015. There may be even older ones out there giving even earlier time frames, but I don't have recollection of reading them, probably because they were before my time.
Meanwhile our overall water use has continued to grow considerably, but also more efficient in many ways, agriculture today uses far less water to irrigate than they did even 30 years ago for the same or even better yield. (Incidentally the cessation of flood irrigation on many crops seems to have led to plummeting water levels in some aquifer systems, as those water inputs had become included in the water budget used for granting water rights to others... oops) We now use less water to flush the toilet, so on and so forth.
Yes, we've benefited from actions taken decades earlier in regards to conservation and reduction of water use, and most of the easier things have been done now. But that isn't to say more cannot and will not happen.
Once again, they haven't been done yet because they aren't as easy to do, and there wasn't a compelling need at the time. That's changing now.