Judges 3:4

Amplified Bible (AMP)
They were [allowed to remain] for the testing of Israel, to determine whether Israel would listen to and obey the commandments of the Lord, which He had commanded their fathers (ancestors) through Moses.

Read Judges 3:4 in other translations