I'd suggest that you are confused. Nothing you do will fit a cubic polynomial well to that data.
It seems to have two points where the function approaches a singularity. You are trying to fit a square peg into a round hole. Worse, it seems you have two curves in that data set.
Even if I split your data into two pieces, the curve you have is not a cubic polynomial. Polynomials simply do not have that fundamental shape, because no polynomial ever has a derivative singularity in it (thus a point of infinite slope.)
Thus, lets try a cubic fit to the first 154 data points in your data.
plot(x_outside(1:154),y_outside(1:154))
I simply used the basic fitting tools in plot itself, which is exactly what polyfit will give you. As you can see, a polynomial will not approximate a function well with a singularity at the ends.
Now, is this better than what you show? OF COURSE IT IS!!!!!! Because what you showed was the result of fitting a cubic polynomial to TWO SETS OF DATA.
polyfit(x_outside,y_outside,3)
ans =
4.43419574654287e-06 -0.0083952855040473 -2.47023950662053 8133.82849470259
So of course that generates complete crap. But surely you need to expect that?