When you close the last open window of a program, it's up to the program if it's going to quit or not. If it doesn't quit, then it'll show up in the list of running programs but nothing will "come to the front" when you select it because there's no window to come to the front. You can tell the program became active by looking at the program name to the right of the Apple in the menu bar.

This took me a bit to get used to, but it's second nature now.