Why do we binarize sigmoid output?

Hi, In the sigmoid neuron module, we are fitiing the sigmoid neuron to the actual data and predicting the output on X_train, then we are trying to binarize them based on the threshold 0.68

Now Y_pred_train is nothing but the predicted values by sigmoid which is actually the probability, ideally
the probability greater than 0.5 is considered as 1 and below as 0 class. Why professor is using thershold value
to binarize the predicted value.

Consider for a binary classification problem there are 5 data points. Now the sigmoid model predicts a probability value between 0 to 1 for each of the 5 data points. Say the predicted probabilities for 5 data points are [0.65, 0.25, 0.58, 0.78, 0.85].

If we take mean of these 5 predicted outcomes it will be (sum (0.65, 0.25, 0.58, 0.78, 0.85)/5) which results in 0.622. Now we got a threshold value of 0.62 and from the data analysis we can decide on to which part belongs to 0 and 1 through binarization.