Let's say you are working on the Chrome browser in Desktop 2. Now, you keep the browser open and close Desktop 2. The browser will get merged in the previous desktop i.e. Desktop 1. Hence apps and programs that are not closed on one desktop get merged and moves to the previous workspace.