Choosing a model is also a use of data. If you repeatedly inspect the test score while changing settings, the test set has become part of model selection. Keep a validation partition inside training for those decisions, then evaluate the chosen approach once on the final holdout.
Leakage can also enter through a feature. A refund posted after cancellation may predict cancellation very well, but it doesn't exist at prediction time. Preprocessing can leak information when you fit it on the whole dataset before splitting. The tasks distinguish selection rows from final evaluation rows and ask you to remove a direct copy of the outcome. Good performance is useful only when the information and timing match the decision you plan to make.
fit_X, valid_X, fit_y, valid_y = train_test_split(X_train, y_train, test_size=1/3, random_state=23, stratify=y_train)
The validation set supports choices such as model depth. The final test set answers a later question after those choices are fixed.