Historically, the awk and sed regex engines had a \w that supported underscores and perl was designed as a much improved version of these tools. Don't know the history before that, but I suspect it is derived from the idea that C identifiers can contain letters, numbers and underscores. You can use
Unicode character classes for alpha matching: