He used to care enough about money to not say these things publicly. Now he's got so much money that it really doesn't matter if it costs him a billion dollars to tweet something stupid.
Either that or all the ketamine over the long term fucked up his brain somehow.
His daughter was 14 at the time of this tweet. I don't know when she came out to Musk, but it's possible this tweet was before he started treating her like shit.