DCAing is worse on average for simple objective functions, absolutely. Markets rise more consistently than they fall. But markets also fall faster than they rise. This may not matter to the hypothetical average person, but it matters to real people, and some of them make the perfectly rational decision, based on real-life economic factors that aren't captured by simple models, to trade returns for stability.
You can formulate this as e.g. an MINLP model and it isn't at all hard to construct situations that are favorable to DCA when lump-sum is an option. All it takes is adding constraints to reflect a real person's life circumstances. Other strategies are still better than DCA, but they're also more complicated to execute, and we aren't talking about sophisticated investors here.
If you're expecting a non-continuous return function, such as a pending drug testing result or a major governments deal, then you're actively trading and a DCA strategy is almost certainly suboptimal.
It's very hard to construct a situation which is both plausible and favorable for DCA _if you have all the funds upfront_.