In time series data moving averages are calculated to filter out the short term fluctuations and incorporate longterm trend for forecasting.
for example, if you do not follow moving average trend method for forecasting and instead just use monthly average, there are chances that the forecasting is not correct because of some seasonal high sales in a particular month, which will again affect your overall average and the forecasting. with moving average trend method this particular high sales month will be smoothed in the trend thus giving good forecast
As was said above, the moving average is just one method to eliminate random fluctuations.
The moving average s not necessarily better than using your most recent observation as forecast, but in some situations it gives good results.
In order to find the most suitable method, you need to understand if you have seasonality or/and trends. There are special statistical tests for that. Then you can apply some automatic modelling procedures such as SARIMA automatic modelling based on information criteria. This will let you objectively find the best model.