1 Samuel 12:22

For the LORD will not forsake his people for his great name’s sake: because it hath pleased the LORD to make you his people.

Israel had sinned in asking for a king. In doing so they had rejected God's rule over them. The Lord will not forsake or abandon His people for His great name's sake, because it pleased Him to make them His people. He is merciful and forgiving and desires to show them favor when they obey Him.

Even after that sin His mercy remains available, so the people can still turn back to Him and follow Him. Therefore they should not despair or turn away from serving Him. They are called to fear Him and to follow and serve Him wholeheartedly. They must not go after worthless pursuits that cannot help them. This assurance does not excuse wrongdoing or permit continued sin, for continued and persistent wickedness will bring judgment.