Why split data into training, validation, and test sets?
The training set fits the model; the validation set tunes hyperparameters and guides choices (so you don't peek at the test set); the test set gives a final, unbiased estimate of real-world performance. If you tune against the test set, your reported accuracy becomes optimistic and misleading. Cross-validation rotates the validation split to use data efficiently when data is limited.