They were for testing Israel, to know whether they would obey the mitzvot of Adonai, which He had commanded their fathers by Moses’ hand.