I don't think Musk is doing it due to greed. He may or maynot be profiting with these hypes he create, but most of his tweets comes to challenge the establishment. He's a vocal supporter of crypto and decentralization. He likes to challenge the established economic system. He even spoke in favor of wallstreetbets which basically is a revolt against institutional control of free market.
Well I am doubting too that he was doing this out of greedy but the fact that he are earning a profit from Dogecoin will always in picture. Base on my research about Elon Musk he was enjoying doing things that was literally not a usual thing that every person are doing in life. Like when people are taking the same path with others and when he saw that many are following that path he will going to create a new path or if there were a path where no one else takes he will probably would take that path. Simply, he just wanted to prove the other way, like for example we are all full support to bitcoin but he found incredible things in Dogecoin so that's is why he is giving his support to this token.