If you have two windows, :q closes the current window, and most people do that all the time, for removing buffers from the view. But if you only have one window and run that, with the intention of dumping the buffer or simply by mistake, your Vim is closed...