Rabbi Yochanan said: “Had the Torah not been given, we would have learned … not to commit theft by observing an ant.” (Gemara Eruvin 100b)
The Midrash expounds  upon the verses from Mishlei 6:6-8: “Go to the ant, you lazy one: consider her ways and grow wise. Though there is no officer or guard who rules over her, she prepares her food in the summer and stores up her food in the harvest time.”…
The Rabbis said: “Let us note how proper is the conduct of the ant. Let us be impressed by how it distances itself from theft.”
Rabbi Shimon ben Chalafta said: “Once, an ant dropped its wheat kernel, and each ant that sniffed it ran away and refused to touch that which was not hers. Finally, the one who dropped the wheat came, sniffed it, and retrieved that which was hers.”
All this, concludes the Midrash, is how the ant behaves naturally, without being taught by any other creature; it abhors theft without any judge or guard enforcing the rules.
The Chidushei HaRim presented a piercing question against the Midrash. How can we be impressed by the conduct of the ant? After all, every grain it has is stolen from fields owned by others! How can we be impressed and learn how to avoid theft from a creature whose entire sustenance is gathered from stolen goods?
The answer is that, on the one hand, it stays clear from any theft from its peers. On the other hand, it steals its food from people. The reason for this confusion, as our verse in Mishlei explains, is that the ant has no officer or guard to direct its behaviour. In other words, it has no guide to develop its morals in order to define what is proper and what is unacceptable.
The message of the Midrash is that good intentions are not enough. Without Torah, the world would be chaotic. Even one who understands that theft is unethical can only succeed within a system that formally defines what is allowed and what is illegal behaviour. The world needs Torah to teach judges and legislators to define lawful conduct, and we also need officers to monitor and enforce justice.[2/3]
1. Devarim Rabbah 5:2
2. Devarim 16:18
3. Based on the article “The ant teaches about theft” in the Daf Yomi Digest Number 319 from the Chicago Centre for Torah & Chesed.