Your hypothetical example though is a very useful way of understanding these things. Infact it just helped me understand clearly why companies should keep as little cash as possible - unless they can generate returns better than atleast govt bonds.
If not paid as a dividend, where else would that profit go but to cash in the bank at time T+1? (Technically, it's free cash flow that goes to cash in the bank, but the difference isn't meaningful here.)
As twitter has shown, valuation does not need to correlate to any traditional financial metric whatsoever. Twitter is worth 1 Bn becomes someone decided to pay for a stake at that valuation. No other reason.
Since everyone expects it to happen it generally does.
The fact is, there is nothing predictable in the stock market.
edit: as BobbyH points out, my point about shorting is mistaken but that does not change the key point about unpredictability of the markets vis a vis declaring a dividend.
I think that while there is a lot that is unpredictable about the stock market, you can be fairly sure that on a dividend's effective date, the share price will fall by roughly the amount of the dividend. It won't be exact due to all the other factors which would affect a stock's price on any day, but it will be roughly correct.
That's why investors can't make an infinite amount of money by shorting stocks right prior to the dividend date...
For an extreme example, imagine a hypothetical company with 1 billion shares outstanding and $1B in the bank and no other business than earning interest on its cash. With $1B in the bank, it should be valued at $1/share plus some share of expected future interest payments. Pay out a $1/share dividend, and the company is now worth $0.