Is a hypothesis necessary for empirical research? Suppose I would like to do an experiment that compares two existing methods for solving a certain problem, and decides which method is better (in some predefined metric).

I can start with a hypothesis: "Method A performs at least as good as method B", and then do the experiment and refute the hypothesis by showing that method B performs better and the difference is statistically significant.

Alternatively, I can just do the experiment without any preliminary hypothesis, and find out - again - that method B performs better and the difference is statistically significant.

Is there any advantage to the first approach? Why do I need to start with a hypothesis if I end up doing the same experiment and getting to the same result?
You fail to recognize you already had a hypothesis. You have method A and method B, so clearly both are important And you knew that a priori. 

That said, you can remain agnostic as to the direction or non-direction of the effect (better? Worse?) - and that is the difference between one-tailed and two-tailed tests.