Fishes and dolphins have similar organs and shape because although they have phylogenetically distant ancestors they face similar environmental pressures since they share the same habitat (water). So by undergoing genetic variability and natural selection some similar features, for example, the hydrodynamic body and the presence of fins, were incorporated into these animals.