The dividend price drops occurs only because the market believe this and reduces the price of their orders. It’s driven by the market responding to the loss of cash, the fact the cash was spent cannot impact share price unless there is buying and selling. The company doesn’t set the share price except for IPO.
It is compounded by Dividend Reinvestment Programs, where the dividends end up buying more stock.
Additionally, I think your equation is wrong. Company Value = assets - liabilities.
Market cap = n shares * price.
Market cap != company value.
Big tech stock is very similar to cryptocurrency. It’s all about the greater fool who will buy it from you.