We split the data into a training and test set because we want to mimic the "real world", essentially, how our model will perform when it encounters new/unseen examples.
The test set will no longer mimic the real world once we use it to develop our model, even if we only use it to scale or determine moments for imputations. Our model will essentially have additional information which could ultimately improve the overall performance of the test set - the following phenomenon is known as data leakage and it is the reason why many models tend to do poorly when faced with new examples.
As a best practice, it is recommended to split your data into a training and test set from the beginning. Put away the test set and do not touch it until you are ready to evaluate the model. As an example of how to do this, you would apply all of your transformations or changes to the test set based on observations made from the training set. For example: Standardizing a variables in the train and test set using the moments estimated using the training set (example - see option 3). This will give you a better indication of how your model will perform on unseen examples.