This is not accurate. Companies hold back some stock during their IPO for various reasons. Amazon held back 23 million shares. It also has repurchased a fair number of shares it holds as "treasury stock" on its balance sheet that appears to have netted them a few billion in appreciation.
This of course pales in comparison to the 478 million outstanding shares, so, you are correct: their shares don't appreciate nearly enough from the $15 billion surge in market cap to pay for the $13.7 billion purchase. However, to say "whatever the stock does has no impact on the company" is also inaccurate.