This question may sound silly. Can we sort the dependent variable Y of a dataset and apply Linear Regression on it. What I think is, it introduces Bias on the model and it will perform poorly on unseen data. Please correct me if I'm wrong. What are all the other reasons on why we should not do it. Explain with an example.
Example: Matching $x_1, x_2, \ldots, x_n$ with $y_{(1)}, y_{(2)},\ldots, y_{(n)}$(sorted asc) where $y_{(j)}$ is the $jth$ smallest value of $y_1,\ldots, y_n$.