You didn't get anything for free. 40.50 went from your left pocket to your right pocket. If your tax-free allowance has already been used up, the money was also taxed in the meantime. It's the same as if you bought 10 Apple shares, sold two and said you got the money for two Apple shares for free.
What I mean is that with the dividend I can't buy a few more shares and continue to build up the position. Maybe I expressed it wrong or it came through wrong. Anyway, have a nice WE all ✌️