What makes a website valuable?

Three things: what it can attract, what it can hold, and what it can convert. Every metric in common use is a proxy for one of those.

The practical version is that a site is worth what would still arrive next month if you stopped working on it, multiplied by what that arriving attention can be turned into. Traffic on its own answers neither half of that sentence, which is why two sites with identical traffic routinely sell for very different amounts.

Longer answer: what makes a digital property valuable.