in sci fi stories they always have a scientific explanation for things
I think there are two issues with this: it’s not a requirement that sci-fi explain things; and it’s not clear what would qualify an explanation as “scientific”.
I would say, rather, that the implicit set of laws governing a sci-fi world are a superset of those currently understood to govern ours, while in a fantasy world the governing laws contradict those governing ours.