why to use Scaler.fit only on x_train and not on x_test for normalizing value using MinMaxScaler? while normalising the data everone is saying that we need to fit only on x_train and not on x_test ? why is that we should not fit x_test ?

if we should not fit the scaler on x_test then why we need to apply the transformation alone on x_test ? 

from sklearn.preprocessing import MinMaxScaler
Scaler=MinMaxScaler()
Scaler.fit(X_train)
x_train=Scaler.transform(x_train)
x_test=Scaler.transform(x_test)
If you would fit the scaler using x_test you would be using information from your test set and would be leaking data. This is information that you would not have if your model was in production and can therefore not use when fitting your model.