Because the function maps any real number to it is very useful for defining a hypothesis for a binary classification problem.
Every will be classified as and every will be interpreted as .
In the logistic function every inputs which is greater or equal to zero will be greater than or equals than 0.5 as output (like you can see above in the graph).
Therefore we can say that every will be classified as and every will be classified as .
A decision boundary is called the line which separates the are and . The line will be directly created by the hypothesis function.
E.g. if then if which results to . So the decision boundary will be a straight vertical line one the graph where . Everything on the left excluding the points on will be in the class and everything on the right including the points on will be in the class of .
Logistic Regression does also work for non linear models through changing the shape of , e.g. through feature engineering.