The previous verse refers to the Fear prayer which is a shortening prayer as well.
This is a general command for all the Muslims to remember Allah (swt) in all conditions even though it relates here to the shortening of prayer. Remembrance is the opposite of forgetting, that is we have to make the remembrance of Allah (swt) a basic issue in our life.
When the fear or the travel ends, Allah (swt) commands us to establish the prayers in their complete usual specific times and forms.