The new is older than the old

I've always wondered as to the the purpose of placing the Israelites under the law, when God knew full well that they could never receive salvation by it.  Why the old covenenant and then the new covenant?  This morning I understood Galatians 3: righteousness through faith predates the law.  Paul declares that the law cannot ammend that covenant: righteousness by faith.