The importance of the membership problem

Given a word $w$ and a language $L$, we want to check if $w\in L$. This is called the membership problem. Why is the membership problem important?

Suppose we show that a language $L$ belongs to some class $C$ of languages (say $L$ is regular). So what? Why would we bother showing that?
One reason is because we want to answer membership queries – given a word $x$, is it in $L$? For example, $L$ might be the context-free fragment of the syntax of a programming language, and we would like to be able to parse source code.
For an arbitrary language $L$, it is hopeless to answer the membership problem efficiently (or even at all). However, for some classes of languages, such as regular languages and context-free languages, efficient algorithms do exist. This is why these classes are important in the first place.