While it was written a long time before the "church" it certainly had to pass editorial approval by "church" leaders.
And the dudes who "edited" all the books that went into the bible were politically connected Romans.
And you don't need to specifically say exactly what you want the reader to infer from the passage.
Dale Carnegie even described this as, "you can get anybody to do anything so long as they think it was their idea."
So, it could be argued that that passage was included to sway the readers intentions.
Also, even though no church may have existed at that time of writing, religious leaders, keepers of sacred texts, etc. have always had huge amounts of power over the population.
So I can easily see how that particular passage would easily have two simultaneous meanings, one that sounds like good common sense, and another to create a easily manageable population.
That's the kind of thing all religious leaders are good at.
However, if you are a "word of god" type guy, you'll tend to believe all sacred texts are divinely inspired and therefore infallible.
If you are a skeptic of authority, you'll see all sacred texts as means to the end of easier population control.
I've read some scholars who postulate the book of Job was re-written, had different endings added, etc., to better reflect the Jewish history particularly in the face of large setbacks.
Those who study Chinese mythology say it's hard to tell the difference between organic myths and ones that were co-opted to help the state rule more effectively.
It's hard to argue that religious/mythical texts don't have a certain element if population control built into them.