If you interrupt the loading screen (Alt + F4, crash or press the X button). You close the application but the javaw.exe process will not end itself and keeps running in the background.
Same goes if you are in-game and exit directly to desktop
Exiting from SP to desktop however seems fine, it's just Multiplayer that has that issue.