Musk didn't inflate Doge. He tweeted about it and a bunch of get rich quick folks scrambled to buy, driving the price up like a penny stock.
A share of stock represents a tiny percentage share in a company's assets and profits. For simplicity, let's say a company has 100 shares, and you own 1 share or 1%. If they then issue 100 new shares and sell them on the market to raise cash, your ownership in the company has been diluted from 1% to 0.5%.
That's why company shares will never be safe as an arbitrary store of value like bitcoin is. No one can arbitrarily dilute your share of the bitcoin pie.