Companies pay for API access so profits go up and stock value go up.
I assume the reddit stock doesn't pay dividends based on profits. But if you bought for 10 dollars and now it is 500 dollars? You can sell some of that stuck to people hoping it will go up to 1000 dollars for a solid profit. And so forth.
And if it DOES pay dividends (some kinds of stocks do) then a percentage of those profits are directly sent to the share holders based on how many shares they have.