We don’t. In fact these specific fish undoubtedly weren’t the ones. It’s an example of convergent evolution where a “good idea” is selected numerous times. However, it shows one way it could have happened 395 million years ago when we find the first amphibion fossils along with likely fish candidates for common ancestors.
What would the “good idea” to “bad idea” ratio need to exceed before life was wiped out altogether, let alone evolve?