What is the role of logistic function in logistic regression? After training Logistic regression on training data, getting each test sample to algorithm computes weighted sum of sample features. If this is greater than zero, we know the sample is from negative class and otherwise, sample is positive. I want to know why we need to calculate the logistic function that map our weighted sum to range zero and one. One reason can be that we want to interpret the results as probability. are there any other reasons?
Because it makes the network learn the desired output (usually 1 or 0) much easier. It is possible to omit the logistic function (aka sigmoid function) and achieve desired results, but the network has to learn to specifically map each input to one or zero which is hard when it has the ability to map it to any real number. 
The logistic function makes it easier because the network just has to learn to map it to a positive or negative number. 

Now the network can map an input to -6 if it wanted to and still produce the desired output -1, whereas before it has to output specifically -1.  

Also, @Media logistic regression doesn't need a non-linearity for this purpose. It will still only be able to separate the data in a linear fashion.