The simple answer to your question is really "All of the above..." But, we're talking about a variety of things...
Thumper had it correct in that value comes down to what something is worth to someone. I might not be willing to spend a cent on a photo, painting or other piece of art, but if someone else is willing to pay a million dollars, that is its value and the creator will make some money and it will be easier for them to sell other work.
Selling work or building a career is a combination of many things including who you know, who those people know and talk to, how well you market, who happens to be paying attention when something is released and many, many other variables. The reality is that only a couple of those coming together at the right place and time are all that is required to sell something. The other side of that reality is that it rarely happens on a scale that has significant impact on the artist's economic status or career.
As an example, over 10 years ago, I paid about $150 for a framed 8x10 sports photo taken by some photographer I don't know and don't care about. I bought the photo for two reasons. It was at a charity auction where lots of that money went to the charity and it was a photo I liked of a player I respected. I would never have purchased it - even autographed - for that price had I seen it in one of those sports memorabilia stores and I probably wouldn't have ever seen it. I just don't look for those things. So, a combination of things happened that got that photographer a sale (assuming they hadn't sold the rights to the photo) but I don't think it it had any significant impact on their wallet or their career.
Like that photographer, I'm more the photojournalist rather than an artistic photographer. That is also an example of why I decided to take a different career path. In any form of art - and I am including photojournalism in that - it is very hard to stand out from the crowd.