Programming runs along the back of mathematics. A field famous for spending centuries wasting time on silly games until those same silly games end up being the foundation on which modern society functions.
Even if LLMs completely remove the need for programming (a rather big IF), this is not time wasted.