You're talking about inductive reasoning. The idea that a pattern in past observations can be extended to predict future observations. Hypotheses are the patterns, proposed because of past observations.
It's not just used in science. It's the basis on which we get through pretty much every aspect of our lives. On a small everyday scale we constantly have to try to predict future experiences/observations. We do it on the basis of our past experiences. Is it justified? Yes. It is justified because it is has so far been useful. It seems, so far, to have worked. So we might as well keep doing it until it stops working. Utility is the justification.
Of course, this type of reasoning is formally invalid. You cannot say that the antecedent is true because the consequent is.
The antecedent is a hypothesis based on previous observations. It is never asserted to be true with absolute certainty. It is proposed to be probable because the consequent continues the pattern of past observations. That is why scientific theories can never be proved true.