Why in the stacking of scikit-learn the estimators are fitted on the whole training data? In chapter 7 of "Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow", the first step of stacking method is spliting the train data into two subsets. The first subset is used to train the predictors in the first layer. Next, the first layer’s predictors are used to make predictions on the second (held-out) set and then create a new training set using these predicted values as input features. Use this new training set to train a blender：


But in Stacked generalization part of scikit-learn: "During training, the estimators are fitted on the whole training data X_train. They will be used when calling predict or predict_proba", it seems that scikit-learn use all data to train the "first layer" predictors. Why scikit-learn use this setting?

As in Tim's answer, obtaining k-fold cross-validated predictions instead of the single split of data gives each estimator in the ensemble more data to learn from.  It is important to not use predictions from the base learners on their own training set, lest the meta-estimator just copy the most-overfit base learner, but using k-fold takes care of that (see the next sentence from the paragraph you quoted).
When the docs say the base estimators are trained on the entire dataset, it means for the final ensemble ("when calling predict or predict_proba").  Again the point is that more data is better, and since the meta-estimator is already trained, the overfitting question is avoided.  Besides, with the k-fold predictions of the base estimators, we otherwise don't have a single trained version of each base model anymore, so something needs to be retrained in any case.
