this is just the way OS X works. its a document and windowed based operating system. as a rule of thumb every app which can open multiple windows will not quit when you close the last window and every app that only has one window i.e. System Preferences, Disk Utility, iPhoto etc will quit when you close its window.
if you have no files or windows open you can just let the app sit open in RAM and when you want to open a file or window later on is super quick. take Photoshop for example, it takes a while to open so if you want to access a photo later on youd just leave Photoshop open.
if you want the app to quit when closing the last window/file just press "command-Q" instead of clicking the red "X".