Suppose I have data $\{y_i,x_i\}_{i=1}^N$, where $x_i\in\{s_1,...,s_K\}$ and follows a discrete uniform distribution. For each realized $x_i$, $y_i$ is generated by the logit model, i.e., $Pr(Y_i=1|x_i)=\frac{exp(\beta_0+x_i\beta_1)}{1+exp(\beta_0+x_i\beta_1)}$. We want to estimate $(\beta_0,\beta_1)$ using data $\{y_i,x_i\}_{i=1}^N$. There are two natural ways of doing it: one method is the maximum likelihood approach:
$(\widehat{\beta}_0,\widehat{\beta}_1)=\underset{\beta_0,\beta_1}{argmax} \sum_{i=1}^N y_ilog[\frac{exp(\beta_0+x_i\beta_1)}{1+exp(\beta_0+x_i\beta_1)}]+(1-y_i)log[\frac{1}{1+exp(\beta_0+x_i\beta_1)}]$
The other way of doing it is the minimum distance, that is I could first estimate $Pr(Y_i=1|x_i=s_k)$ using $\frac{\sum_{i=1}^N\mathbf{1}(y_i=1,x_i=s_k)}{\sum_{i=1}^N\mathbf{1}(x_i=s_k)}$ for $s\in \{s_1,...,s_K\}$ and denote this estimator as $\widehat{p}_k$. We choose the parameter to minimize the discrepancy between model-implied probability and relative frequency:
$(\widetilde{\beta}_1,\widetilde{\beta}_2)=\underset{\beta_0,\beta_1}{argmin}||[\frac{exp(\beta_0+s_1\beta_1)}{1+exp(\beta_0+s_1\beta_1)},...,\frac{exp(\beta_0+s_K\beta_1)}{1+exp(\beta_0+s_K\beta_1)}]-[\widehat{p}_1,...,\widehat{p}_K] ||^2$.
Intuitively, both estimators should be consistent (converging to the true value that generates our data). But on the other hand, they seem to be doing completely different things, one is trying to make the likelihood as large as possible, and the other is trying to make the model-implied probabilities as close to the relative frequencies as possible. Why the parameter value that maximizes the likelihood is also able to set the distance to zero in the limit? Intuition or formal proof are both welcome.