Why did Sparta become a military state?