This paper doesn’t show that simulation is the purpose of REM (though it may be) however they do go on to speculate that the simulation that is occurring could be used to improve the brain’s predictive models of movement actions and their outcomes without needing to move the muscles.
It is thus conceivable that the internal model that coordinates activity between SC and ADN observed during REM sleep may be at work also in the awake animal. This would allow the brain to predict shifts in head direction following the issuing of a motor command in the SC, before the motor command is executed and thus have a real time estimate of heading rather than depending on the necessarily delayed sensory feedback from the vestibular canals. … In the absence of error signals, these internal models are free to unfold and may represent the building blocks of the brain’s generative activity during REM or REM-like sleep in humans and animals.