Both correlation and linear regression explain the linearity in data but to get a high correlation coefficient the data must be linear with a slope close to 1. In some cases you can have linear data that can be fit on a regression line with a slope less than one, in which case the correlation coefficient will be low. My question is, should not we consider linear regression rather than correlation?
Your conjecture that the correlation is only one for slope one is wrong, as you can easily test with data on a line with slope 0.5:
This returns 1 because the correlation is 1 whenever all data points lie exactly on a line with slope greater than zero.