There are several reasons:
1. Some language doesn't lend well to IDE. In a Dynamic Language, an object's members (e.g. method, property, instance variable) may be added, removed, or changed at run-time, it is impossible for an IDE to enumerate all the object's members and give code completion. In these languages, using IDE have little advantages, and may instead become a "box" to the programmer's mind (since you instinctively won't type anything not in the code completion suggestion). Example of dynamic language: Python, Perl, Lisp
2. Some text editors are better code editor than most IDE. This seems counter-intuitive, but some programmer-oriented text editor (e.g. vim, emacs, gedit) is capable of doing most of the thing you want like syntax highlighting, press F5 to run, inserting snippets, etc while keeping themselves small and fast by not having features that are used much less. These editors blurs the boundary between text editor and IDE.
An IDE does many things: editing, compiling, debugging, GUI designing, project managing, "make"-ing, etc, etc, etc the list goes on. As a programmer, you spend most of your time writing and editing code, most of the other features in IDE won't be used. A standalone text editor usually have a much more powerful editing features than an IDE's text editor because... well because their focus is on editing text.
3. Text editor is universal. You don't have to use five different editors to write programs in five different languages.
4. Some people "worships" their favorite text editor. This is why when you ask "what is the best text editor?" in a programming language forum, the thread is very likely to get into a flame war of people defending their favorite text editors (to death).
PS: Notepad is NOT a programmer's text editor. It is silly to write anything serious in notepad. Most programmers would only use Notepad if and only if they are not on their own machine and the machine doesn't have any other text editor.