“For” can be used to mean “because”, such as in this sentence, but it’s almost always either archaic or extremely formal. In everyday speech, you would almost never use “for” in this sense, unless, as previously stated, you’re speaking or writing in an extremely formal setting. And even then, there are generally better ways to express the same meaning.
But you will often see it in writing, especially if you’re reading the classics. In the sentence above, it also has a slightly more nuanced meaning than “because” - I would say it adds a certain definiteness that “because” does not carry.
Hope that helps :)