Planting trees is about ecosystem conservation.
Planting and tending a garden is about understanding plant life cycle, the nitrogen cycle, /and/ where food comes from.
Unless the gardens you're thinking of planting self-sustain their nutrients, conserve (or even generate a surplus of) water, and have zero impact on surrounding ecosystems (fertilizer and pesticide runoff), they don't really teach anything about ecosystems other than how we can manipulate them for our gain (greedy or otherwise).