The phrase has its roots in the Bible, specifically in Galatians 6:7: "Do not be deceived: God cannot be mocked. A man reaps what he sows."