Israel was in a sinful state and didn’t repent and seek Jehovah’s guidance before going into battle against the Philistines and suffered a great loss.