One of the primary reasons these filters are used is because of their simplicity of implementation. Have a look at this discussion on the SitePoint forums. It goes through implementing one of these filters; one of the best suggestions there is to use a small SQL snippet. With some basic client-side processing, this can easily be turned into a filter.
Of course, filters like this do also have uses for the client: in some applications (both web, native, and desktop), these filters are used either on their own or often in conjunction with a search box, usually to list names. For example, many email clients use this feature for address (contact) books. My email client lists contacts alphabetically by default, then provides this filter at the top so I can easily look through all my contacts.
There are much more modern ways to index lists such as [...]
True. Since this type of sorting was developed (around the 30's, for use in - guess what - address books, if you're interested), there have been many new developments, including computers themselves. But modern is not synonymous to better. As systems become modernised and more complex, the chance of destroying a good UX with new features increases.
So one possible reason why these filters are still used is for 'historical' reasons - perhaps the website was originally developed with them 10 years ago and the developers haven't seen fit to change that because the users are used to it. Another reason is that it's simple and easy to understand. If you add this to a page:
Filter by: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z All
it's pretty easy to understand.
So when should these filters be used?
When it's likely the user knows the first letter.
For example, names or places. I asked a few people a couple of minutes ago - all of them knew that the capital city of Spain started with an M but 50% of them didn't know the name.
When it makes sense.
Having an alphabetic filter is useless if you have a list of numbers. You only need to use a filter like this in cases where it actually makes sense to have it, such as:
Long lists (of strings)
Short lists don't need filters. Long lists of numbers don't either. What are we left with? Long lists of strings. Obviously there are a couple of other cases too, but this is the main case you'd want a filter like this.