Divi gets discounted from share price so people don’t buy the stock pre ex divi date and sell immediately after… other wise there’s no reason to hold the stock
The price usually recovers a month or so after just in time for the next divi…. If you hold divi stocks long you do get tremendous gains from the dip… but you don’t understand.