How to calculate the displacement from the measured acceleration data?
Generally, the observed effect occurs when there is an offset and/or linear drift present in your measured data. Double integration then leads to the quadratic (or higher order) effect observed in the data. 

As @Stanley Pawlukiewicz states in his answer this can be due to the accelerometer registering gravity (not all accelerometers are capable of registering a constant acceleration field) but also due to temperature fluctuations, (electro)magnetic interference, strain at the base of the accelerometer, etc. Sometimes, it’s possible to “shield” your sensor for these effects but this can also be extremely challenging or expensive. In the latter case pre-processing your data can be an option too enable extracting meaningful results from your data.

The most straightforward approach to get rid of the quadratic drift in your double integrated acceleration signal is to detrend the data before integrating. If you substract the mean value before integrating the acceleration and velocity signals you should get reasonably “close” to the desired result (see matlab’s detrend function for other options). 

Note that there also appears to be other noise and/or content in your measured acceleration signal; i.e. you will probably be able to get “close” to the desired result but will not get the exact same position signal. If that is critical you could use a more sophisticated signal processing approach or, if possible (and preferably) a better sensor (e.g. a position sensor).