Well, not entirely by accident - things like companion planting were very much observable as advantageous for pest control or nutrient efficiency. Think like how carrots and garlic both like being next to radishes, and while carrots thrive with being near peas, garlic suffers. It's quite actionable stuff whether you're deciding the layout and planting sequence of a small kitchen garden or a large plot of land.
I am unsure exactly how much of the biology was understood at the time, but it also wasn't entirely drawn out of thin air. A lot of it was just drawing a bunch of known good practices together as a cohesive design philosophy for how to run a farm.
Spirituality stuff was very in vogue at the time, so it's hard to say if it would have even gotten popular without the cosmic forces type stuff. Even if it was a dubious contribution to the actual mechanics :)