Many applications have both a "close" and a "quit" option. The "close" option does what you describe - they want to get rid of the "quit" option, which is used to quit an application.
(Try opening two Firefox windows and you can easily see the difference.)
(Try opening two Firefox windows and you can easily see the difference.)