Even if fish evolved that way, we’ve seen other apparently equally credible examples of multiple “evolutions” of an identical feature in nature
How do we know that THESE particular hipped fish ever made it past fishhood?
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.