The purpose of a hypothesis test is to avoid being fooled by chance occurrences into thinking that the effect you are investigating (for example, a difference between treatment and control) is real. If you are investigating, say, the difference between an existing process and a (hopefully improved) new process, observed results that don’t show an improvement would not interest you so you do not need to protect yourself against being fooled by “negative” effects, no matter how extreme. A 1-tailed test would be appropriate. If, on the other hand, you are interested in discerning a difference between samples A and B (regardless of which direction the direction goes), a 2-tailed test would be appropriate.
Statistics and data science, defined
2-Tailed vs. 1-Tailed Tests
Where this gets used
We teach data science and statistics online, one subject at a time, on fixed start dates with an instructor who marks your work.