What is the role of logistic function in logistic regression?
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.