I've been learning about machine learning and one of the methods I recently learned was that of logistic regression for classification problems. For sake of simplicity, let's assume that each data point has only one feature $x_i$ and its response is $y_i \in \{0, 1\}$, so our predictor function would be $$p_c(x)=\frac{1}{1+e^{-c_0-c_1x}}.$$ I understand the point of the logistic regression and what it does. What I don't understand is where it comes from to begin with. I see that the logistic function has many nice properties. Is it possible to come up with the logistic function as (perhaps) the only function for which a series of nice properties hold? If so, what would those properties be, and how could I prove that any such function leads to the logistic regression? If not, what would be the most natural way to derive such a function from first principles?
P.S: I did notice other questions here that are similar, but none of them quite answer what I did ask. I looked at pretty much every stack exchange question related to logistic regression/function I found, including those you sent. I've also read about it on the Elements of Statistical Learning, but there they start from taking the log of the ratio of the probabilities, whose motivation I also struggled with.